@Test public void testShouldGetAssignedWorkFlowTypeNamesWhenWorkFlowTypeAndOwnerIdIsProvided() { final List<Long> ownerIds = new ArrayList<>(); ownerIds.add(34L); ownerIds.add(35L); final List<String> types = new ArrayList<>(); types.add("type1"); types.add("type2"); final List<String> expectedAssignedWorkFlowTypes = new ArrayList<>(); when(stateRepository.findAllTypeByOwnerAndStatus(ownerIds, types)).thenReturn(expectedAssignedWorkFlowTypes); final List<String> actualAssignedWorkFlowTypes = stateService.getAssignedWorkflowTypeNames(ownerIds, types); assertEquals(expectedAssignedWorkFlowTypes, actualAssignedWorkFlowTypes); }
public List<String> getAssignedWorkflowTypeNames(List<Long> ownerIds,List<String> enabledTypes) { return stateRepository.findAllTypeByOwnerAndStatus(ownerIds,enabledTypes); }
StateService { public List<String> getAssignedWorkflowTypeNames(List<Long> ownerIds,List<String> enabledTypes) { return stateRepository.findAllTypeByOwnerAndStatus(ownerIds,enabledTypes); } }
StateService { public List<String> getAssignedWorkflowTypeNames(List<Long> ownerIds,List<String> enabledTypes) { return stateRepository.findAllTypeByOwnerAndStatus(ownerIds,enabledTypes); } @Autowired  StateService(final StateRepository stateRepository); }
StateService { public List<String> getAssignedWorkflowTypeNames(List<Long> ownerIds,List<String> enabledTypes) { return stateRepository.findAllTypeByOwnerAndStatus(ownerIds,enabledTypes); } @Autowired  StateService(final StateRepository stateRepository); boolean isPositionUnderWorkflow(final Long posId, final Date givenDate); List<String> getAssignedWorkflowTypeNames(List<Long> ownerIds,List<String> enabledTypes); State getStateByIdAndTenantId(final Long id, final String tenantId); @Transactional State create(final State state); @Transactional State update(final State state); }
StateService { public List<String> getAssignedWorkflowTypeNames(List<Long> ownerIds,List<String> enabledTypes) { return stateRepository.findAllTypeByOwnerAndStatus(ownerIds,enabledTypes); } @Autowired  StateService(final StateRepository stateRepository); boolean isPositionUnderWorkflow(final Long posId, final Date givenDate); List<String> getAssignedWorkflowTypeNames(List<Long> ownerIds,List<String> enabledTypes); State getStateByIdAndTenantId(final Long id, final String tenantId); @Transactional State create(final State state); @Transactional State update(final State state);  }