@Test
  public void testGetCurrentTimeUsesSystemClock() {
    DefaultEnvironmentEdge edge = new DefaultEnvironmentEdge();
    long systemTime = EnvironmentEdgeManager.currentTime();
    long edgeTime = edge.currentTime();
    assertTrue("System time must be either the same or less than the edge time",
      systemTime < edgeTime || systemTime == edgeTime);
    try {
      Thread.sleep(1);
    } catch (InterruptedException e) {
      fail(e.getMessage());
    }
    long secondEdgeTime = edge.currentTime();
    assertTrue("Second time must be greater than the first", secondEdgeTime > edgeTime);
  }
Tests to make sure that the default environment edge conforms to appropriate behaviour.
hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestDefaultEnvironmentEdge.java