### Question:
DeveloperService { @Transactional public Developer update(Long id, DeveloperDTO developerDTO) { Developer developer = developerRepository.findOne(id); HeimdallException.checkThrow(developer == null, GLOBAL_RESOURCE_NOT_FOUND); developer = GenericConverter.mapper(developerDTO, developer); developer = developerRepository.save(developer); 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);  }### Answer:
@Test public void updateWithDeveloperNotFound() { thrown.expect(NotFoundException.class); thrown.expectMessage("Resource not found"); Mockito.when(developerRepository.findOne(developer.getId())).thenReturn(null); developerService.update(developer.getId(), developerDTO); }