@Test
  public void close_doesNothingIfAlreadyClosed() {
    gemFireCacheImpl = gemFireCacheImpl(false);
    gemFireCacheImpl.close();

    verify(internalDistributedSystem).disconnect();

    assertThatCode(() -> gemFireCacheImpl.close())
        .doesNotThrowAnyException();

    verify(internalDistributedSystem).disconnect();
  }
InternalDistributed.disconnect is invoked only once despite invoking GemFireCacheImpl.close
more than once.
geode-core/src/test/java/org/apache/geode/internal/cache/GemFireCacheImplCloseTest.java