package fp; import junit.framework.TestCase; /** * A JUnit test case class. * Every method starting with the word "test" will be called when running * the test with JUnit. */ public class Test_Add extends TestCase { ILambda add = Add.Singleton; public void testAdd() { System.out.println(add.apply(2, 3).getClass()); assertEquals("2 +3", 5, add.apply(2, 3)); assertEquals("0 +3", 3, add.apply(0, 3)); add.apply(2); } }