Stacktrace { public static IStacktrace getCurrent() { return getCurrent(DEFAULT_INCLUDE_LINE_NUMBER); }  static IStacktrace getInstance(Throwable th); static IStacktrace getInstance(Throwable th, boolean includeLineNumbers); static IStacktrace getInstance(IThrowable th); static IStacktrace getInstance(IThrowable th, boolean includeLineNumbers); static IStacktrace getCurrent(); static IStacktrace getCurrent(boolean includeLineNumbers); static IStacktrace getInstance(StackTraceElement[] elements); static IStacktrace getInstance(StackTraceElement[] elements, boolean includeLineNumbers); static final boolean DEFAULT_INCLUDE_LINE_NUMBER; }
@Test public void testGetCurrent() throws Exception { String txt1 = Stacktrace.getCurrent().getStacktraceText(); String txt2 = Stacktrace.getCurrent(Stacktrace.DEFAULT_INCLUDE_LINE_NUMBER).getStacktraceText(); assertEquals(txt1, txt2); }