@Test public void testIsActive_3() throws Exception { expect(tx.getStatus()).andThrow(new SystemException("bad")); replay(tx); try { jut.isActive(); } catch (DoceException e) { assertEquals("bad", e.getCause().getMessage()); } }
@Test public void testBegin_2() throws Exception { tx.begin(); expectLastCall().andThrow(new SystemException("bad")); replay(tx); try { jut.begin(); } catch (DoceException e) { assertEquals("bad", e.getCause().getMessage()); } }
@Test public void testCommit_3() throws Exception { expect(tx.getStatus()).andReturn(Status.STATUS_ACTIVE); tx.commit(); expectLastCall().andThrow(new SystemException("bad")); replay(tx); try { jut.commit(); } catch (DoceException e) { assertEquals("bad", e.getCause().getMessage()); } }