/** Fixtures. */ @Before public void setup() { Provider prov = mock(Provider.class); jotm = new JotmTransactionManager(prov); when(prov.getTransactionManager()) .thenAnswer( new Answer<TransactionManager>() { public TransactionManager answer(InvocationOnMock invocation) throws Throwable { return jotm; } }); Bo2Session.setProvider(prov); }
/** Teardown fixtures. */ @After public void teardown() { jotm.close(); Bo2Session.setProvider(null); }