TransactionStatus { public boolean isInConnectionHeldTransaction() { return inTransaction && TransactionType.BASE != transactionType; } TransactionStatus(final TransactionType initialTransactionType); void setTransactionType(final TransactionType transactionType); boolean isInConnectionHeldTransaction();  }
@Test public void assertSetInTransaction() { transactionStatus.setInTransaction(true); boolean actual = transactionStatus.isInConnectionHeldTransaction(); assertTrue(actual); }