import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; public class TestClassComposite extends TestCase { public TestClassComposite(String method) { super(method); } static public Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(TestClassOne.class); suite.addTest(TestClassTwo.suite()); return suite; } } class TestClassOne extends TestCase { public TestClassOne(String method) { super(method); } public void testLongRunner() { assertEquals(2300, 50); } } class TestClassTwo extends TestCase { public TestClassTwo(String method) { super(method); } public void testLongRunner() { assertEquals(2300, 50); } public static Test suite() { TestSuite suite = new TestSuite(); suite.addTest(new TestClassTwo("testLongRunner")); return suite; } }