@Override
  public synchronized UUID findFirst(JobAuthorization.State jobState) {
    // Mimic an index lookup
    for (Entry<UUID, Map<String, Object>> job : JOB_MAP.entrySet()) {
      Map<String, Object> properties = job.getValue();
      State state = State.valueOf(properties.get(PortabilityJob.AUTHORIZATION_STATE).toString());
      UUID jobKey = job.getKey();
      monitor.debug(
          () ->
              format(
                  "Looking up first job in state %s: found job %s (state %s)",
                  jobState, jobKey, state));
      if (state == jobState) {
        return jobKey;
      }
    }
    return null;
  }
Finds the ID of the first {@link PortabilityJob} in state {@code jobState} in the map, or null
if none found.
extensions/cloud/portability-cloud-local/src/main/java/org/datatransferproject/cloud/local/LocalJobStore.java