@Test public void getStateDtoByIdShouldNotReturnStateDtoWhenInvalidIdIsGiven() { given(statesRepository.findOne(INVALID_STATE_ID)).willReturn(null); StateDTO result = stateService.getStateDtoById(INVALID_STATE_ID); assertThat(result, nullValue()); }
@Transactional(readOnly = true) @Override public StateDTO getStateDtoById(Long id) { Assert.notNull(id); return converterService.convert(statesRepository.findOne(id), StateDTO.class); }
StateServiceImpl implements StateService { @Transactional(readOnly = true) @Override public StateDTO getStateDtoById(Long id) { Assert.notNull(id); return converterService.convert(statesRepository.findOne(id), StateDTO.class); } }
StateServiceImpl implements StateService { @Transactional(readOnly = true) @Override public StateDTO getStateDtoById(Long id) { Assert.notNull(id); return converterService.convert(statesRepository.findOne(id), StateDTO.class); }  }
StateServiceImpl implements StateService { @Transactional(readOnly = true) @Override public StateDTO getStateDtoById(Long id) { Assert.notNull(id); return converterService.convert(statesRepository.findOne(id), StateDTO.class); }  @Transactional(readOnly = true) @Override StateDTO getStateDtoById(Long id); @Transactional(readOnly = true) @Override StateDTO getStateDtoByName(String name); }
StateServiceImpl implements StateService { @Transactional(readOnly = true) @Override public StateDTO getStateDtoById(Long id) { Assert.notNull(id); return converterService.convert(statesRepository.findOne(id), StateDTO.class); }  @Transactional(readOnly = true) @Override StateDTO getStateDtoById(Long id); @Transactional(readOnly = true) @Override StateDTO getStateDtoByName(String name);  }