PersistenceManager pm = pmf.getPersistenceManager();
pm.getObjectIdClass(Card.class);
//get the sequence
Sequence s = pm.getSequence(CARD_SEQ);
assertNotNull("Sequence " + CARD_SEQ + " should not be null.", s);
Card c1 = new Card();
c1.setName("card 1");
Card c2 = new Card();
c2.setName("card 2");
Collection c = new ArrayList();
c.add(c1);
c.add(c2);
//make persistent
pm.currentTransaction().begin();
pm.makePersistentAll(c);
pm.currentTransaction().commit();
assertTrue(c1.getId() < c2.getId());
pm.close();
}