protected static void waitForFileToDelete(final File file, final long millis, final long sleep) {
    boolean done = false;
    try {
      for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < millis; done =
          (!file.exists())) {
        Thread.sleep(sleep);
      }
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }
    assertTrue("Waiting for file to be deleted: " + file, done);
  }
Integration TestCase for StatSampler.

@since GemFire 7.0
geode-junit/src/main/java/org/apache/geode/internal/statistics/StatSamplerTestCase.java