// Finds all the objects
int initialNumber = customerService.findAllCustomers().size();
// Creates an object
Customer customer = new Customer("Richard", "Stallman", "rich", "rich", "rich@gnu.org", new Address("78 Gnu Rd", "Texas", "666", "WWW"));
// Persists the object
customer = customerService.createCustomer(customer);
String login = customer.getLogin();
// Finds all the objects and checks there's an extra one
assertEquals("Should have an extra object", initialNumber + 1, customerService.findAllCustomers().size());
// Finds the object by login
customer = customerService.findCustomer(login);
assertEquals("Richard", customer.getFirstname());
// Updates the object
customer.setFirstname("Rich");
customerService.updateCustomer(customer);
// Finds the object by login
customer = customerService.findCustomer(login);
assertEquals("Rich", customer.getFirstname());
// Deletes the object
customerService.removeCustomer(customer);
// Checks the object has been deleted