@Override
      public boolean done() {
        Map<String, Integer> listnerMap = serverVM
            .invoke(InterestRegrListenerDUnitTest::getListenerMapTask);
        getLogWriter().info("Listener Map " + listnerMap);
        registerCount = getMapValueForKey(listnerMap, REGISTER_INTEREST);
        unregisterCount = getMapValueForKey(listnerMap, UNREGISTER_INTEREST);
        if (registerCount == 3 && unregisterCount == 3) {
          return true;
        }
        getLogWriter()
            .info("Waiting for counts to each reach 3.  Current registerCount=" + registerCount
                + "; unregisterCount=" + unregisterCount);
        return false;
      }
Written to test fix for Bug #47132
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java