import org.junit.Assert; public class SimpleMathTest { SimpleMath math; @org.junit.Before public void setUp() throws Exception { math = new SimpleMath(); } @org.junit.Test public void testSum() throws Exception { Assert.assertTrue(math.sum(4, 5) == 9); Assert.assertTrue(math.sum(0, 0) == 0); Assert.assertTrue(math.sum(0, -1) == -1); Assert.assertTrue(math.sum(6, -6) == 0); Assert.assertTrue(math.sum(15, -9) == 6); } @org.junit.Test public void testDifference() throws Exception { Assert.assertTrue(math.difference(4, 5) == -1); Assert.assertTrue(math.difference(0, 0) == 0); Assert.assertTrue(math.difference(0, -1) == 1); Assert.assertTrue(math.difference(6, -6) == 12); Assert.assertTrue(math.difference(15, 5) == 10); } }