@Test void testGetProcessDefinitionKey() { Operation mockedOperation = createMockedOperation(PROCESS_ID, ProcessType.DEPLOY, Operation.State.RUNNING); Mockito.when(metadataMapper.getDiagramId(ProcessType.DEPLOY)) .thenReturn(Constants.DEPLOY_SERVICE_ID); String processDefinitionKey = operationsHelper.getProcessDefinitionKey(mockedOperation); Assertions.assertEquals(Constants.DEPLOY_SERVICE_ID, processDefinitionKey); }
public String getProcessDefinitionKey(Operation operation) { return metadataMapper.getDiagramId(operation.getProcessType()); }
OperationsHelper { public String getProcessDefinitionKey(Operation operation) { return metadataMapper.getDiagramId(operation.getProcessType()); } }
OperationsHelper { public String getProcessDefinitionKey(Operation operation) { return metadataMapper.getDiagramId(operation.getProcessType()); } @Inject  OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper,
                            ProcessHelper processHelper); }
OperationsHelper { public String getProcessDefinitionKey(Operation operation) { return metadataMapper.getDiagramId(operation.getProcessType()); } @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 String getProcessDefinitionKey(Operation operation) { return metadataMapper.getDiagramId(operation.getProcessType()); } @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);  }