### Question:
RightBoundFunction implements Function<A, T> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof RightBoundFunction<?, ?>)) { return false; } RightBoundFunction<?, ?> that = (RightBoundFunction<?, ?>) obj; return function.equals(that.function) && (null == param ? null == that.param : param.equals(that.param)); } @SuppressWarnings("unchecked") <R> RightBoundFunction(BinaryFunction<? super A, ? super R, ? extends T> function, R arg); T evaluate(A obj); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static RightBoundFunction<L, T> bind(BinaryFunction<? super L, ? super R, ? extends T> function,
                                                          R arg);  }### Answer:
@Test public void testEquals() throws Exception { Function<Object, Object> f = RightBoundFunction.bind(LeftIdentity.FUNCTION,"xyzzy"); assertEquals(f,f); assertObjectsAreEqual(f,new RightBoundFunction<Object, Object>(LeftIdentity.FUNCTION,"xyzzy")); assertObjectsAreNotEqual(f,Constant.of("xyzzy")); assertObjectsAreNotEqual(f,new RightBoundFunction<Object, Object>(RightIdentity.FUNCTION,"xyzzy")); assertObjectsAreNotEqual(f,new RightBoundFunction<Object, Object>(LeftIdentity.FUNCTION,"bar")); assertObjectsAreNotEqual(f,new RightBoundFunction<Object, Object>(LeftIdentity.FUNCTION,null)); assertObjectsAreEqual(new RightBoundFunction<Object, Object>(LeftIdentity.FUNCTION,null),new RightBoundFunction<Object, Object>(LeftIdentity.FUNCTION,null)); assertTrue(!f.equals(null)); }