@Test
public void deleteWithDeveloperNotFound() {

    thrown.expect(NotFoundException.class);
    thrown.expectMessage("Resource not found");
    Mockito.when(developerRepository.findOne(Mockito.anyLong())).thenReturn(null);
    developerService.delete(developer.getId());
}