EntityTransactionImpl implements EntityTransaction { @Override public void rollback() { verifyTransactionActive("rollback"); wrapper.getTransactionUOW().rollback(); wrapper.getEntityManager().removeCurrentPersistenceContext(); cleanup(); LOG.trace("EntityTransaction rolled back."); } EntityTransactionImpl(EntityTransactionWrapper wrapper); @Override void begin(); @Override void commit(); @Override void rollback(); @Override void setRollbackOnly(); @Override boolean isRollbackOnly(); @Override boolean isActive();  }
@Test public void testRollback() { transaction.begin(); transaction.rollback(); assertFalse(transaction.isActive()); verify(uowMock).rollback(); }