public static String getStackTrace() {
    try {
      throw new Exception("Exception to get stack trace");
    } catch (Exception e) {
      StringWriter sw = new StringWriter();
      e.printStackTrace(new PrintWriter(sw, true));
      return sw.toString();
    }
  }
Get a stack trace of the current stack and return it as a String
geode-core/src/integrationTest/java/org/apache/geode/cache/RemoveAllCacheListenerPeerRegressionTest.java