@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]); }