  @Test
  public void find_by_deploymentSpec_earliest_latest() {

    ZonedDateTime beforeDeployment = ZonedDateTime.now();

    runWithAnotherDeployment(() -> {
      DeploymentSpec deploymentSpec = DeploymentSpec.builder()
        .earliestDeployment(beforeDeployment)
        .latestDeployment(ZonedDateTime.now())
        .build();

      Optional<ProcessDefinition> processDefinition = finder.find(with(deploymentSpec));
      assertThat(processDefinition.isPresent()).overridingErrorMessage("ProcessDefinition not found for %s", deploymentSpec).isTrue();
    });
  }