import junit.framework.TestCase; public class TestInOtherThread extends TestCase { public void testException() { new Thread(new Runnable() { public void run() { // uncaught, should cause failure but does not throw new RuntimeException(); } }).start(); } public void testAssertion() { new Thread(new Runnable() { public void run() { // fails, should cause failure but does not assertTrue(false); } }).start(); } }