private void ensureCacheClosed() {
    if (cache != null) {
      cache.close();
      cache = null;
    }
  }
modifies cache field as a side-effect
geode-assembly/src/acceptanceTest/java/org/apache/geode/client/sni/ClientSNIDropProxyAcceptanceTest.java