Status.STATUS_ACTIVE, Status.STATUS_ACTIVE);
given(tm.getTransaction()).willReturn(transaction1);
given(tm.suspend()).willReturn(tx1);
given(tm.getTransaction()).willReturn(transaction2);
given(sf.getTransactionManager()).willReturn(tm);
given(sf.openSession()).willReturn(session1, session2);
given(session1.isOpen()).willReturn(true);
given(session2.isOpen()).willReturn(true);
given(session1.getFlushMode()).willReturn(FlushMode.AUTO);
given(session2.getFlushMode()).willReturn(FlushMode.AUTO);