private int assertStatisticsNotification(StatisticsNotification notification,
      Map<String, Number> expectedValues) throws StatisticNotFoundException {
    int statCount = 0;
    for (StatisticId statId : notification) {
      Number value = expectedValues.remove(statId.getStatisticDescriptor().getName());
      assertThat(value).isNotNull();
      assertThat(notification.getValue(statId)).isEqualTo(value);
      statCount++;
    }

    return statCount;
  }
Integration test for the SampleCollector class.

@since GemFire 7.0
geode-core/src/integrationTest/java/org/apache/geode/internal/statistics/ValueMonitorIntegrationTest.java