import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; class X { static int three() { return 3; } }; @RunWith(HadoopRunner.class) public class TestAdd { @Test public void testAdd() { assertEquals(1 + 1, 2); } @Test public void testSub() { assertEquals(1 - 1, 0); } @Test public void testMul() { /* Should fail. */ assertEquals(1 * 1, 0); } @Test(timeout=2500) public void testTimeout() { /* Should fail. */ while (true) ; } @Test public void testX() { /* Should fail. */ assertEquals(X.three(), 2); } }