@Test
  public void testCheckVMProcessSize() throws InterruptedException {
    if (OsStatisticsProvider.build().osStatsSupported()) {
      GemFireStatSampler sampler = system.getStatSampler();
      assertNotNull(sampler);

      sampler.waitForInitialization(10000); // fix: remove infinite wait

      ProcessStats stats = sampler.getProcessStats();
      assertNotNull(stats);

      List status = new ArrayList();
      long threshold = stats.getProcessSize() * 2;

      if (threshold <= 0) {
        // The process size is zero on some Linux versions
        return;
      }

      GemFireHealthConfig config = new GemFireHealthConfigImpl(null);
      config.setMaxVMProcessSize(threshold);

      MemberHealthEvaluator eval =
          new MemberHealthEvaluator(config, system.getDistributionManager());
      eval.evaluate(status);
      assertTrue(status.isEmpty());

      status = new ArrayList();
      long processSize = stats.getProcessSize();
      threshold = processSize / 2;
      assertTrue("Threshold (" + threshold + ") is > 0.  " + "Process size is " + processSize,
          threshold > 0);

      config = new GemFireHealthConfigImpl(null);
      config.setMaxVMProcessSize(threshold);

      eval = new MemberHealthEvaluator(config, system.getDistributionManager());
      eval.evaluate(status);
      assertEquals(1, status.size());

      AbstractHealthEvaluator.HealthStatus ill =
          (AbstractHealthEvaluator.HealthStatus) status.get(0);
      assertEquals(GemFireHealth.OKAY_HEALTH, ill.getHealthCode());
      assertTrue(ill.getDiagnosis().indexOf("The size of this VM") != -1);
    }
  }
Tests that we are in {@link GemFireHealth#OKAY_HEALTH okay} health if the VM's process size is
too big.

@see MemberHealthEvaluator#checkVMProcessSize
geode-core/src/integrationTest/java/org/apache/geode/admin/internal/MemberHealthEvaluatorJUnitTest.java