GovernanceTransactionContexts implements TransactionContexts { @Override public void close() throws Exception { contexts.close(); } GovernanceTransactionContexts(final TransactionContexts contexts); @Override Map<String, ShardingTransactionManagerEngine> getEngines(); @Override ShardingTransactionManagerEngine getDefaultTransactionManagerEngine(); @Override void close(); @Subscribe synchronized void renew(final DataSourceChangeCompletedEvent event);  }
@Test public void assertClose() throws Exception { GovernanceTransactionContexts actual = new GovernanceTransactionContexts(transactionContexts); actual.close(); verify(transactionContexts).close(); }