public static String getCallerClassName(final int depth) {
    return new Throwable().getStackTrace()[depth].getClassName();
  }
Returns the name of the class identified by {@code depth} element of the call stack.

@param depth the depth of the call stack to check
@return the name of the class
geode-junit/src/main/java/org/apache/geode/test/util/ResourceUtils.java