public void testAddAndRemoveCustomer() throws Exception { customer = new Customer(); customer.setName("John Doe"); customer.setPhone("928-234-4566"); customer = mgr.save(customer); assertEquals("John Doe", customer.getName()); Long id = customer.getId(); log.debug("removing customer..."); mgr.remove(customer.getId()); try { customer = null; customer = mgr.get(id); } catch (ObjectRetrievalFailureException orgfe) { log.debug("Customer not there"); } assertNull(customer); }
public void testGetItem() throws Exception { customer = mgr.get(new Long(1)); assertNotNull(customer); log.debug(customer); }