public void testExceptionRunningAndTearDown() { // This test documents the current behavior. With 1.4, we should // wrap the exception thrown while running with the exception thrown // while tearing down Test t = new TornDown() { public void tearDown() { throw new Error("tearDown"); } }; TestResult result = new TestResult(); t.run(result); TestFailure failure = (TestFailure) result.errors().nextElement(); assertEquals("tearDown", failure.thrownException().getMessage()); }