public void testUpdate() {
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
Order order = em.find(Order.class, ORDER_1_OID);
USAAddress address = (USAAddress) order.getShipAddress();
address.setCity("Cupertino");
address.setZIP(95014);
em.getTransaction().commit();
em.close();
em = emf.createEntityManager();
em.getTransaction().begin();
order = em.find(Order.class, ORDER_1_OID);
address = (USAAddress) order.getShipAddress();
assertEquals("Cupertino", address.getCity());
assertEquals(95014, address.getZIP());
em.getTransaction().commit();
em.close();
}