public static InternalCache getCache() {
    if (memberStarter == null) {
      throw new RuntimeException("no cache");
    }
    return memberStarter.getCache();
  }
This is only available in each Locator/Server VM, not in the controller (test) VM.
geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java