@Test public void plusInteger() { Function2<Integer, Integer, Integer> plusInteger = Functions2.integerAddition(); Assert.assertEquals(Integer.valueOf(5), plusInteger.value(2, 3)); }
@Test public void asFunction2Function() { Function2<Integer, Object, String> block = Functions2.fromFunction(String::valueOf); Assert.assertEquals("1", block.value(1, null)); }