@Test public void returnsCurrentStacktrace() { final String stacktrace = currentStacktrace(); assertThat(stacktrace).startsWith(this.getClass().getCanonicalName()).contains("\n at "); }
public static String currentStacktrace() { return Stream.of(new Throwable().getStackTrace()).skip(1).map(StackTraceElement::toString).collect(Collectors.joining("\n at ")); }
StacktraceUtils { public static String currentStacktrace() { return Stream.of(new Throwable().getStackTrace()).skip(1).map(StackTraceElement::toString).collect(Collectors.joining("\n at ")); } }
StacktraceUtils { public static String currentStacktrace() { return Stream.of(new Throwable().getStackTrace()).skip(1).map(StackTraceElement::toString).collect(Collectors.joining("\n at ")); } private  StacktraceUtils(); }
StacktraceUtils { public static String currentStacktrace() { return Stream.of(new Throwable().getStackTrace()).skip(1).map(StackTraceElement::toString).collect(Collectors.joining("\n at ")); } private  StacktraceUtils(); static String currentStacktrace(); }
StacktraceUtils { public static String currentStacktrace() { return Stream.of(new Throwable().getStackTrace()).skip(1).map(StackTraceElement::toString).collect(Collectors.joining("\n at ")); } private  StacktraceUtils(); static String currentStacktrace();  }