protected Boolean verifyConnected() {
    if (SystemFailure.getFailure() != null) {
      org.apache.geode.test.dunit.Assert.fail("System failure present!",
          SystemFailure.getFailure());
      return Boolean.FALSE;
    }
    GemFireCacheImpl gfc = (GemFireCacheImpl) cache;
    if (gfc.isClosed()) {
      fail("Cache is closing/closed!");
      return Boolean.FALSE;
    }

    // Let's inspect the distributed system. It should also
    // be connected.
    if (basicGetSystem().getCancelCriterion().isCancelInProgress()) {
      fail("distributed system cancel in progress");
      return Boolean.FALSE;
    }
    if (!basicGetSystem().isConnected()) {
      fail("distributed system not connected");
      return Boolean.FALSE;
    }

    return Boolean.TRUE;
  }
Verify that listener gets called, and exactly once.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/SystemFailureDUnitTest.java