@Test
public void listOperations() {

     List<Operation> operations = new ArrayList<>();
     operations.add(operation);
     Mockito.when(resourceRepository.findByApiIdAndId(Mockito.anyLong(), Mockito.anyLong()))
            .thenReturn(res);
     Mockito.when(this.operationRepository.findAll(Mockito.any(Example.class))).thenReturn(operations);
     List<Operation> operationsResp = this.operationService.list(1L, 1L, this.operationDTO);
     assertEquals(operations.size(), operationsResp.size());
     Mockito.verify(this.operationRepository, Mockito.times(1)).findAll(Mockito.any(Example.class));
}