@Test
public void listResources() {

     List<Resource> resources = new ArrayList<>();
     resources.add(resource);
     Mockito.when(this.apiRepository.findOne(1L)).thenReturn(api);
     Mockito.when(this.resourceRepository.findAll(Mockito.any(Example.class))).thenReturn(resources);
     List<Resource> environmentResp = this.resourceService.list(1L, this.resourceDTO);
     assertEquals(resources.size(), environmentResp.size());
     Mockito.verify(this.resourceRepository, Mockito.times(1)).findAll(Mockito.any(Example.class));
}