### Question:
CustomerServiceImpl implements CustomerService { @Override @Transactional public void updateCustomer(Customer customer) { customerDAO.saveOrUpdate(customer); }  @Override @Transactional(readOnly = true) Optional<Customer> getCustomerByUsername(String username); @Override Customer createNewCustomer(); @Override @Transactional void updateCustomer(Customer customer); CustomerDAO getCustomerDAO(); @Autowired void setCustomerDAO(CustomerDAO customerDAO); AccountDAO getAccountDAO(); @Autowired void setAccountDAO(AccountDAO accountDAO);  }### Answer:
@Test public void shouldUpdateCustomer() throws Exception { Customer customer = new Customer(); userService.updateCustomer(customer); ArgumentCaptor<Customer> customerArgumentCaptor = ArgumentCaptor.forClass(Customer.class); verify(customerDAO).saveOrUpdate(customerArgumentCaptor.capture()); assertThat(customerArgumentCaptor.getValue()).isSameAs(customer); }