@After
  public void tearDown() throws Exception {
    if (cache != null) {
      cache.close();
    }
    if (system != null) {

      final String removeExpectedPEM =
          "<ExpectedException action=remove>" + expectedPrimaryErrorMsg + "</ExpectedException>";
      final String removeExpectedREM =
          "<ExpectedException action=remove>" + expectedRedundantErrorMsg + "</ExpectedException>";

      system.getLogWriter().info(removeExpectedPEM);
      system.getLogWriter().info(removeExpectedREM);

      system.disconnect();
    }
  }
Close the cache and proxy instances for a test and disconnect from the distributed system.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java