@After
  public void tearDown() {
    try {
      if (txMgr != null) {
        txMgr.setWriter(null);
        txMgr.setListener(null);
      }
    } finally {
      closeCache();
    }
  }
Extracted from TXWriterJUnitTest to share with TXWriterOOMEJUnitTest.
geode-junit/src/main/java/org/apache/geode/TXWriterTestCase.java