@Test public void findWithNotFound() { thrown.expect(NotFoundException.class); thrown.expectMessage("Resource not found"); Mockito.when(developerRepository.findOne(developer.getId())).thenReturn(null); developerService.find(developer.getId()); }
public Developer find(Long id) { Developer developer = developerRepository.findOne(id); HeimdallException.checkThrow(developer == null, GLOBAL_RESOURCE_NOT_FOUND); return developer; }
DeveloperService { public Developer find(Long id) { Developer developer = developerRepository.findOne(id); HeimdallException.checkThrow(developer == null, GLOBAL_RESOURCE_NOT_FOUND); return developer; } }
DeveloperService { public Developer find(Long id) { Developer developer = developerRepository.findOne(id); HeimdallException.checkThrow(developer == null, GLOBAL_RESOURCE_NOT_FOUND); return developer; }  }
DeveloperService { public Developer find(Long id) { Developer developer = developerRepository.findOne(id); HeimdallException.checkThrow(developer == null, GLOBAL_RESOURCE_NOT_FOUND); return developer; }  Developer find(Long id); Developer login(DeveloperLogin developerLogin); DeveloperPage list(DeveloperDTO developerDTO, PageableDTO pageableDTO); List<Developer> list(DeveloperDTO developerDTO); @Transactional Developer save(DeveloperDTO developerDTO); @Transactional Developer update(Long id, DeveloperDTO developerDTO); @Transactional void delete(Long id); }
DeveloperService { public Developer find(Long id) { Developer developer = developerRepository.findOne(id); HeimdallException.checkThrow(developer == null, GLOBAL_RESOURCE_NOT_FOUND); return developer; }  Developer find(Long id); Developer login(DeveloperLogin developerLogin); DeveloperPage list(DeveloperDTO developerDTO, PageableDTO pageableDTO); List<Developer> list(DeveloperDTO developerDTO); @Transactional Developer save(DeveloperDTO developerDTO); @Transactional Developer update(Long id, DeveloperDTO developerDTO); @Transactional void delete(Long id);  }