@Test
public void listTest() {

	Mockito.when(apiRepository.findOne(Mockito.anyLong())).thenReturn(api);
	Mockito.when(middlewareRepository.findAll(Mockito.any(Example.class))).thenReturn(middlewareList);
	List<Middleware> middlewareListActual = service.list(1L, new MiddlewareDTO());
	assertEquals(middlewareList, middlewareListActual);
}