Exemplo n.º 1
0
 /** 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);
 }
Exemplo n.º 2
0
 /** Teardown fixtures. */
 @After
 public void teardown() {
   jotm.close();
   Bo2Session.setProvider(null);
 }