public Cache createCache(Properties props) throws Exception {
    ds = getSystem(props);
    cache = CacheFactory.create(ds);
    if (cache == null) {
      throw new Exception("CacheFactory.create() returned null ");
    }
    return cache;
  }
Written to test fix for Bug #47132
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java