// create EM from default EMF
OpenJPAEntityManager em = emf.createEntityManager();
assertNotNull(em);
try {
// verify Validation Mode
OpenJPAConfiguration conf = em.getConfiguration();
assertNotNull(conf);
assertTrue("ValidationMode",
conf.getValidationMode().equalsIgnoreCase("AUTO"));
// create invalid ConstraintBoolean instance
em.getTransaction().begin();
ConstraintBoolean c = ConstraintBoolean.createInvalidFalse();
em.persist(c);
em.getTransaction().commit();