@Before public void prepareDb() throws Exception { getTransactionManager().begin(); EntityManager em = getFactory().createEntityManager(); husband = new Husband("frederic"); husband.setName("Frederic Joliot-Curie"); wife = new Wife("wife"); wife.setName("Irene Joliot-Curie"); wife.setHusband(husband); husband.setWife(wife); em.persist(husband); em.persist(wife); commitOrRollback(true); em.close(); }