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