@SuppressWarnings("deprecation")
  @Before
  public void setUp() throws Exception {
    // System.setProperty("gemfire.stats.debug.debugSampleCollector", "true");

    final Properties props = new Properties();
    props.setProperty(MCAST_PORT, "0");
    props.setProperty(ENABLE_TIME_STATISTICS, "true");
    props.setProperty(STATISTIC_SAMPLING_ENABLED, "false");
    props.setProperty(STATISTIC_SAMPLE_RATE, "60000");

    system = (InternalDistributedSystem) DistributedSystem.connect(props);
    assertNotNull(system.getStatSampler());
    assertNotNull(system.getStatSampler().waitForSampleCollector(TIMEOUT));

    new CacheFactory().create();

    init();

    sample();
  }
Base test case for the management.bean.stats tests.

@since GemFire 7.0
geode-junit/src/main/java/org/apache/geode/management/bean/stats/MBeanStatsTestCase.java