code: private EDBObject removeIfExist(String oid, List<EDBObject> tempList) {
          Iterator<EDBObject> iterator = tempList.iterator();
          while (iterator.hasNext()) {
              EDBObject obj = iterator.next();
              if (obj.getOID().equals(oid)) {
                  iterator.remove();
                  return obj;
              }
          }
          LOGGER.debug(oid + " wasn't found in the list of end state objects");
          return null;
      }
docs: Removes the element with the given oid if it exists in the list and returns it. If it not exists, null will be
  returned.