@Test public void getStateDtoByNameShouldNotReturnStateDtoWhenInvalidNameIsGiven() { given(statesRepository.findByName(INVALID_STATE_NAME)).willReturn(null); StateDTO result = stateService.getStateDtoByName(INVALID_STATE_NAME); assertThat(result, nullValue()); }
@Transactional(readOnly = true) @Override public StateDTO getStateDtoByName(String name) { Assert.notNull(name); return converterService.convert(statesRepository.findByName(name), StateDTO.class); }
StateServiceImpl implements StateService { @Transactional(readOnly = true) @Override public StateDTO getStateDtoByName(String name) { Assert.notNull(name); return converterService.convert(statesRepository.findByName(name), StateDTO.class); } }
StateServiceImpl implements StateService { @Transactional(readOnly = true) @Override public StateDTO getStateDtoByName(String name) { Assert.notNull(name); return converterService.convert(statesRepository.findByName(name), StateDTO.class); }  }
StateServiceImpl implements StateService { @Transactional(readOnly = true) @Override public StateDTO getStateDtoByName(String name) { Assert.notNull(name); return converterService.convert(statesRepository.findByName(name), 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 getStateDtoByName(String name) { Assert.notNull(name); return converterService.convert(statesRepository.findByName(name), StateDTO.class); }  @Transactional(readOnly = true) @Override StateDTO getStateDtoById(Long id); @Transactional(readOnly = true) @Override StateDTO getStateDtoByName(String name);  }