@Test(expected = IllegalArgumentException.class) public void getStateFlowDTOByFromStateDTOShouldThrowIllegalArgumentExceptionWHenStateDtoIsNull() { stateFlowService.getStateFlowDTOByFromStateDTO(null); }
@Transactional(readOnly = true) @Override public Collection<StateFlowDTO> getStateFlowDTOByFromStateDTO(StateDTO statesDTO) { Assert.notNull(statesDTO); Assert.notNull(statesDTO.getId()); Assert.notNull(statesDTO.getName()); List<StateFlowEntity> stateFlowEntities = stateFlowRepository.findByFromStateEntity(converterService.convert(statesDTO, StatesEntity.class)); return converterService.convert(stateFlowEntities, StateFlowDTO.class); }
StateFlowServiceImpl implements StateFlowService { @Transactional(readOnly = true) @Override public Collection<StateFlowDTO> getStateFlowDTOByFromStateDTO(StateDTO statesDTO) { Assert.notNull(statesDTO); Assert.notNull(statesDTO.getId()); Assert.notNull(statesDTO.getName()); List<StateFlowEntity> stateFlowEntities = stateFlowRepository.findByFromStateEntity(converterService.convert(statesDTO, StatesEntity.class)); return converterService.convert(stateFlowEntities, StateFlowDTO.class); } }
StateFlowServiceImpl implements StateFlowService { @Transactional(readOnly = true) @Override public Collection<StateFlowDTO> getStateFlowDTOByFromStateDTO(StateDTO statesDTO) { Assert.notNull(statesDTO); Assert.notNull(statesDTO.getId()); Assert.notNull(statesDTO.getName()); List<StateFlowEntity> stateFlowEntities = stateFlowRepository.findByFromStateEntity(converterService.convert(statesDTO, StatesEntity.class)); return converterService.convert(stateFlowEntities, StateFlowDTO.class); }  }
StateFlowServiceImpl implements StateFlowService { @Transactional(readOnly = true) @Override public Collection<StateFlowDTO> getStateFlowDTOByFromStateDTO(StateDTO statesDTO) { Assert.notNull(statesDTO); Assert.notNull(statesDTO.getId()); Assert.notNull(statesDTO.getName()); List<StateFlowEntity> stateFlowEntities = stateFlowRepository.findByFromStateEntity(converterService.convert(statesDTO, StatesEntity.class)); return converterService.convert(stateFlowEntities, StateFlowDTO.class); }  @Transactional(readOnly = true) @Override Collection<StateFlowDTO> getStateFlowDTOByFromStateDTO(StateDTO statesDTO); }
StateFlowServiceImpl implements StateFlowService { @Transactional(readOnly = true) @Override public Collection<StateFlowDTO> getStateFlowDTOByFromStateDTO(StateDTO statesDTO) { Assert.notNull(statesDTO); Assert.notNull(statesDTO.getId()); Assert.notNull(statesDTO.getName()); List<StateFlowEntity> stateFlowEntities = stateFlowRepository.findByFromStateEntity(converterService.convert(statesDTO, StatesEntity.class)); return converterService.convert(stateFlowEntities, StateFlowDTO.class); }  @Transactional(readOnly = true) @Override Collection<StateFlowDTO> getStateFlowDTOByFromStateDTO(StateDTO statesDTO);  }