@Test
public void listPageableTest() {

	Mockito.when(apiRepository.findOne(Mockito.anyLong())).thenReturn(api);
	Mockito.when(middlewareRepository.findAll(Mockito.any(Example.class), Mockito.any(Pageable.class))).thenReturn(getPageMiddleware());
	MiddlewarePage middlewarePage = service.list(1L, new MiddlewareDTO(), new PageableDTO());
	assertEquals(middlewareList, middlewarePage.getContent());
}