@Override
    public long currentTime() {
      StackTraceElement[] elements = new Exception().getStackTrace();
      // the first element is us, the second one is EnvironmentEdgeManager, so let's check the third
      // one
      if (elements.length > 2 && elements[2].getClassName().startsWith(packageName)) {
        return delegate.currentTime();
      } else {
        return System.currentTimeMillis();
      }
    }
Used by tests to inject an edge into the manager. The intent is to minimise the use of the
injectEdge method giving it default permissions, but in testing we may need to use this
functionality elsewhere.
hbase-common/src/test/java/org/apache/hadoop/hbase/util/EnvironmentEdgeManagerTestHelper.java