public void testEmptyFlush() {
OpenJPAEntityManager pm = getPM();
TListener listener = new TListener();
((OpenJPAEntityManagerSPI) pm).addTransactionListener(listener);
startTx(pm);
ModRuntimeTest1 pc = new ModRuntimeTest1();
pm.persist(pc);
pm.flush();
assertEquals(1, listener.flushes);
assertEquals(0, listener.commits);
pm.flush();
assertEquals(1, listener.flushes);
assertEquals(0, listener.commits);
pc.setIntField(3);
pm.flush();
assertEquals(2, listener.flushes);
assertEquals(0, listener.commits);
endTx(pm);