public static void closeCache() {
    try {
      if (cache != null && !cache.isClosed()) {
        cache.close();
        cache.getDistributedSystem().disconnect();
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
Creates the cache

@param props - distributed system props
@throws Exception - thrown in any problem occurs in creating cache
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/HAOverflowMemObjectSizerDistributedTest.java