@Test
  public void createWithSystem_doesNotSetSystemCache_onGivenSystem_ifSystemCacheIsOpen_andExistingOk_butCacheIsNotCompatible() {
    InternalCache incompatibleOpenCache = cache("incompatible", OPEN);
    InternalDistributedSystem givenSystem = systemWith(incompatibleOpenCache);
    when(givenSystem.getCache()).thenReturn(incompatibleOpenCache);

    InternalCacheBuilder internalCacheBuilder = new InternalCacheBuilder(
        new Properties(), throwingCacheConfig(new IllegalStateException("incompatible")),
        metricsSessionBuilder,
        THROWING_SYSTEM_SUPPLIER, THROWING_SYSTEM_CONSTRUCTOR, THROWING_CACHE_SUPPLIER,
        THROWING_CACHE_CONSTRUCTOR);

    ignoreThrowable(() -> internalCacheBuilder
        .setIsExistingOk(true)
        .create(givenSystem));

    verify(givenSystem, never()).setCache(any());
  }
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