@Override
      public boolean done() {
        final ManagementService service = getManagementService();
        final DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
        if (bean != null) {
          return bean.listCacheServers().length > 0;
        }
        return false;
      }
This is for testing server count details from MBean
geode-cq/src/distributedTest/java/org/apache/geode/management/internal/pulse/TestServerDUnitTest.java