WorkflowStateProcessorFactory { public WorkflowStateProcessor createProcessor(long instanceId, Supplier<Boolean> shutdownRequested) { return new WorkflowStateProcessor(instanceId, shutdownRequested, objectMapper, workflowDefinitions, workflowInstances, workflowInstanceDao, maintenanceDao, workflowInstancePreProcessor, env, processingInstances, listeners); } @Inject  WorkflowStateProcessorFactory(WorkflowDefinitionService workflowDefinitions, WorkflowInstanceService workflowInstances,
      ObjectStringMapper objectMapper, WorkflowInstanceDao workflowInstanceDao, MaintenanceDao maintenanceDao,
      WorkflowInstancePreProcessor workflowInstancePreProcessor, Environment env); WorkflowStateProcessor createProcessor(long instanceId, Supplier<Boolean> shutdownRequested); int getPotentiallyStuckProcessors();  }
@Test public void factoryCreatesExecutorsWithoutListeners() { WorkflowStateProcessor executor = factory.createProcessor(12, FALSE::booleanValue); assertNotNull(executor); }
@Test public void factoryCreatesExecutorsWithListeners() { factory.listeners = listeners; WorkflowStateProcessor executor = factory.createProcessor(122, FALSE::booleanValue); assertNotNull(executor); }