### Question:
ConditionalFunction implements Function<A, T> { public T evaluate(A obj) { if (ifPred.test(obj)) { return thenFunc.evaluate(obj); } else { return elseFunc.evaluate(obj); } } ConditionalFunction(Predicate<? super A> ifPred, Function<? super A, ? extends T> thenFunc,
        Function<? super A, ? extends T> elseFunc); T evaluate(A obj); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEvaluate() throws Exception { ConditionalFunction<Object, Object> f = new ConditionalFunction<Object, Object>( Identity.INSTANCE, Constant.of("left"), Constant.of("right")); assertEquals("left",f.evaluate(Boolean.TRUE)); assertEquals("right",f.evaluate(Boolean.FALSE)); }