code: private Connector getConnectorById(Evse evse, Long id, boolean exceptionIfNotFound) {
          for (Connector connector:evse.getConnectors()) {
              if (id.equals(connector.getId())) {
                  return connector;
              }
          }
          if (exceptionIfNotFound) {
              throw new EntityNotFoundException(String.format("Unable to find connector with id '%s'", id));
          } else {
              return null;
          }
      }
docs: Gets a Connector by id.
  
  @param evse                  evse which should contain the connector.
  @param id                    connector id.
  @param exceptionIfNotFound   throw EntityNotFoundException if connector cannot be found.
  @return connector or null if it cannot be found and exceptionIfNotFound is false.
  @throws EntityNotFoundException if exceptionIfNotFound is true and the Connector cannot be found.