MethodEndpoint { public boolean equals(Object o) { if (this == o) { return true; } if (o != null && o instanceof MethodEndpoint) { MethodEndpoint other = (MethodEndpoint) o; return this.bean.equals(other.bean) && this.method.equals(other.method); } return false; } MethodEndpoint(Object bean, Method method);  MethodEndpoint(Object bean, String methodName, Class<?>... parameterTypes);  MethodEndpoint(String beanName, BeanFactory beanFactory, Method method); Object getBean(); Method getMethod(); MethodParameter[] getMethodParameters(); MethodParameter getReturnType(); Object invoke(Object... args); boolean equals(Object o); int hashCode(); String toString();  }
@Test public void testEquals() throws Exception { Assert.assertEquals("Not equal", endpoint, endpoint); Assert.assertEquals("Not equal", new MethodEndpoint(this, method), endpoint); Method otherMethod = getClass().getMethod("testEquals"); Assert.assertFalse("Equal", new MethodEndpoint(this, otherMethod).equals(endpoint)); }