@Test
public void deleteAllTest() {

	Mockito.when(middlewareRepository.findByApiIdAndId(Mockito.anyLong(), Mockito.anyLong())).thenReturn(middleware);
	Mockito.when(middlewareRepository.findByApiId(Mockito.anyLong())).thenReturn(middlewareList);
	service.deleteAll(1L);
	Mockito.verify(middlewareRepository, Mockito.times(1)).findByApiId(Mockito.anyLong());
}