@Test public void testFindAll() { List<Customer> customers = new ArrayList<Customer>(); customers.add(customer); when(customerRepository.findAll()).thenReturn(customers); assertEquals(1, customerService.findAll().size()); }