@Test public void deleteWithSuccess() { Mockito.when(developerRepository.findOne(Mockito.anyLong())).thenReturn(developer); developerService.delete(developer.getId()); Mockito.verify(developerRepository, Mockito.times(1)).findOne(Mockito.anyLong()); }
@Transactional public void delete(Long id) { Developer developer = developerRepository.findOne(id); HeimdallException.checkThrow(developer == null, GLOBAL_RESOURCE_NOT_FOUND); developerRepository.delete(developer); }
DeveloperService { @Transactional public void delete(Long id) { Developer developer = developerRepository.findOne(id); HeimdallException.checkThrow(developer == null, GLOBAL_RESOURCE_NOT_FOUND); developerRepository.delete(developer); } }
DeveloperService { @Transactional public void delete(Long id) { Developer developer = developerRepository.findOne(id); HeimdallException.checkThrow(developer == null, GLOBAL_RESOURCE_NOT_FOUND); developerRepository.delete(developer); }  }
DeveloperService { @Transactional public void delete(Long id) { Developer developer = developerRepository.findOne(id); HeimdallException.checkThrow(developer == null, GLOBAL_RESOURCE_NOT_FOUND); developerRepository.delete(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 { @Transactional public void delete(Long id) { Developer developer = developerRepository.findOne(id); HeimdallException.checkThrow(developer == null, GLOBAL_RESOURCE_NOT_FOUND); developerRepository.delete(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);  }