int initialNumber = catalogService.findAllItems().size();
// Creates an object
Category category = new Category("Fish", "Any of numerous cold-blooded aquatic vertebrates characteristically having fins, gills, and a streamlined body");
Product product = new Product("Angelfish", "Saltwater fish from Australia", category);
Item item = new Item("Large", 10.00f, "fish1.jpg", product, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum velit ante, malesuada porta condimentum eget, tristique id magna. Donec ac justo velit. Suspendisse potenti. Donec vulputate vulputate molestie. Quisque vitae arcu massa, dictum sodales leo. Sed feugiat elit vitae ante auctor ultrices. Duis auctor consectetur arcu id faucibus. Curabitur gravida.");
// Persists the object
item = catalogService.createItem(item);
Long id = item.getId();
// Finds all the objects and checks there's an extra one
assertEquals("Should have an extra object", initialNumber + 1, catalogService.findAllItems().size());
// Finds the object by primary key
item = catalogService.findItem(id);
assertEquals("Large", item.getName());
// Updates the object
item.setName("Large fish");
catalogService.updateItem(item);
// Finds the object by primary key
item = catalogService.findItem(id);
assertEquals("Large fish", item.getName());
// Deletes the object
catalogService.removeItem(item);
// Checks the object has been deleted