@Test void testComputeOperationStateWhenProcessIsInNonFinalStateAndProcessIsInErrorState() { Mockito.when(processHelper.computeProcessState(PROCESS_ID)) .thenReturn(State.ERROR); Operation.State state = operationsHelper.computeProcessState(PROCESS_ID); Assertions.assertEquals(Operation.State.ERROR, state); }
public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject  OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper,
                            ProcessHelper processHelper); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject  OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper,
                            ProcessHelper processHelper); String getProcessDefinitionKey(Operation operation); Operation addErrorType(Operation operation); Operation addState(Operation operation); Operation.State computeState(Operation operation); Operation.State computeProcessState(String processId); List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject  OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper,
                            ProcessHelper processHelper); String getProcessDefinitionKey(Operation operation); Operation addErrorType(Operation operation); Operation addState(Operation operation); Operation.State computeState(Operation operation); Operation.State computeProcessState(String processId); List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList);  }