### Question:
CustomerService { public Customer getByEmail(String email) { log.debug("Get customer {}", email); Preconditions.checkNotNull(!Strings.isNullOrEmpty(email), "Email value is required for data retrieval"); return customerRepository.getByEmail(email); }  List<Customer> getCustomers(); Customer getByEmail(String email); void store(Customer newCustomer);  }### Answer:
@Test public void getByEmail() { Customer byEmail = customerService.getByEmail("email"); Assertions.assertThat(byEmail).isNotNull(); Mockito.verify(customerRepository).getByEmail("email"); }