/** static convenience for {@link #cleaned(Throwable)} */ public static <T extends Throwable> T cleanedStackTrace(T t) { return DEFAULT_INSTACE.cleaned(t); }
@Test public void cleanTestTrace() { RuntimeException t = StackTraceSimplifier.newInstance(StackTraceSimplifierTest.class.getName()) .cleaned(new RuntimeException("sample")); // should exclude *this* class also Assert.assertTrue(t.getStackTrace()[0].getClassName().startsWith("org.testng"), "trace was: "+t.getStackTrace()[0]); }