@Override
      public Object call() throws Exception {
        InternalResourceManager irm = getCache().getInternalResourceManager();
        final ResourceAdvisor ra = irm.getResourceAdvisor();
        WaitCriterion wc = new WaitCriterion() {
          @Override
          public String description() {
            return "verify profiles failed. Current profiles: " + ra.adviseGeneric();
          }

          @Override
          public boolean done() {
            return numberOfProfiles == ra.adviseGeneric().size();
          }
        };
        GeodeAwaitility.await().untilAsserted(wc);
        return null;
      }
Verifies that the test listener value on the given vm is what is expected Note that for remote
events useWaitCriterion must be true

@param vm the vm where verification should take place
@param value the expected value
@param useWaitCriterion must be true for remote events
geode-core/src/distributedTest/java/org/apache/geode/cache/management/MemoryThresholdsDUnitTest.java