public InternalCache getOrCreateCache() {
    if (cache == null || cache.isClosed()) {
      cache = null;
      createCache();
      assertThat(cache).isNotNull();
    }
    return cache;
  }
Use {@code Builder} for more options in constructing {@code CacheRule}.

@return a new {@code Builder}
geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/CacheRule.java