@Test
  public void createWithSystem_returnsSystemCache_ifSystemCacheIsOpen_andExistingOk_andCacheIsCompatible() {
    InternalCache compatibleOpenCache = cache("compatible", OPEN);
    InternalDistributedSystem givenSystem = systemWith(compatibleOpenCache);

    InternalCacheBuilder internalCacheBuilder = new InternalCacheBuilder(
        new Properties(), new CacheConfig(), metricsSessionBuilder, THROWING_SYSTEM_SUPPLIER,
        THROWING_SYSTEM_CONSTRUCTOR,
        THROWING_CACHE_SUPPLIER, THROWING_CACHE_CONSTRUCTOR);

    InternalCache result = internalCacheBuilder
        .setIsExistingOk(true)
        .create(givenSystem);

    assertThat(result).isSameAs(compatibleOpenCache);
  }
Unit tests for {@link InternalCacheBuilder} when
{@code InternalDistributedSystem.ALLOW_MULTIPLE_SYSTEMS} is set to true.
geode-core/src/test/java/org/apache/geode/internal/cache/InternalCacheBuilderAllowsMultipleSystemsTest.java