PersistenceManager pm = pmf.getPersistenceManager();
pm.getObjectIdClass(Product.class);
//get the sequence
Sequence s = pm.getSequence(PRODUCT_SEQ);
assertNotNull("Sequence " + PRODUCT_SEQ + " should not be null.", s);
Product p1 = new Product();
p1.setName("product 1");
Product p2 = new Product();
p2.setName("product 2");
//make persistent
pm.currentTransaction().begin();
pm.makePersistent(p1);
pm.makePersistent(p2);
pm.currentTransaction().commit();
assertTrue(p1.getReference() < p2.getReference());
pm.close();
}