@Test
public void deleteWithNotFoundTest() {

    thrown.expect(NotFoundException.class);
    thrown.expectMessage("Resource not found");
    Mockito.when(scopeRepository.findByApiIdAndId(Mockito.anyLong(), Mockito.anyLong())).thenReturn(null);
    scopeService.delete(scope.getApi().getId(), scope.getId());
}