### Question:
TransactionManagementImpl implements TransactionManagement, StatisticsProvider { @Override public void rollbackTransaction(long txId) throws BagriException { logger.trace("rollbackTransaction.enter; got txId: {}", txId); Transaction xTx = txCache.get(txId); if (xTx != null) { triggerManager.applyTrigger(xTx, Order.before, Scope.rollback); xTx.finish(false, cluster.getClusterTime()); txCache.set(txId, xTx); } else { throw new BagriException("No transaction found for TXID: " + txId, ecTransNotFound); } thTx.set(TX_NO); cntRolled.incrementAndGet(); triggerManager.applyTrigger(xTx, Order.after, Scope.rollback); publishCounters(false, xTx.getDocsCreated(), xTx.getDocsUpdated(), xTx.getDocsDeleted()); cleanAffectedDocuments(xTx); logger.trace("rollbackTransaction.exit; tx: {}", xTx); }  void setRepository(SchemaRepositoryImpl repo); void setHzInstance(HazelcastInstance hzInstance); void setExecPool(ExecutorService execSvc); void setPublishCounters(boolean publishCounters); TransactionIsolation getTransactionLevel(); void setTransactionLevel(String txLevel); long getTransactionTimeout(); void setTransactionTimeout(long timeout); void adjustTxCounter(long maxUsedId); @Override long beginTransaction(); @Override long beginTransaction(TransactionIsolation txIsolation); @Override void commitTransaction(long txId); @Override void rollbackTransaction(long txId); @Override boolean finishCurrentTransaction(boolean rollback); @Override boolean isInTransaction(); boolean isTxVisible(long txId); @Override V callInTransaction(long txId, boolean readOnly, TransactionIsolation txLevel, Callable<V> call); @Override CompositeData getStatisticTotals(); @Override @SuppressWarnings("unchecked") TabularData getStatisticSeries(); @Override void resetStatistics();  }### Answer:
@Test public void rollbackTransactionTest() throws Exception { long txId = xRepo.getTxManagement().beginTransaction(); storeSecurityTest(); Collection<Long> sec = getSecurity("VFINX"); assertNotNull(sec); assertTrue("expected 1 but got " + sec.size() + " test documents", sec.size() == 1); sec = getSecurity("IBM"); assertNotNull(sec); assertTrue("expected 1 but got " + sec.size() + " test documents", sec.size() == 1); sec = getSecurity("PTTAX"); assertNotNull(sec); assertTrue("expected 1 but got " + sec.size() + " test documents", sec.size() == 1); assertEquals(user_name, ((TransactionManagementImpl) xRepo.getTxManagement()).getCurrentTransaction().getStartedBy()); xRepo.getTxManagement().rollbackTransaction(txId); sec = getSecurity("VFINX"); assertNotNull(sec); assertTrue("expected 0 but got " + sec.size() + " test documents", sec.size() == 0); sec = getSecurity("IBM"); assertNotNull(sec); assertTrue("expected 0 but got " + sec.size() + " test documents", sec.size() == 0); sec = getSecurity("PTTAX"); assertNotNull(sec); assertTrue("expected 0 but got " + sec.size() + " test documents", sec.size() == 0); }