### Question:
MethodSignature implements Serializable { @Override public boolean equals(Object o) { if (o == null) { return false; } if (o == this) { return true; } if (o.getClass() != getClass()) { return false; } MethodSignature other = (MethodSignature) o; return other.internal.equals(internal); } MethodSignature(Method method); Method toMethod(Class<?> type); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEquals() throws Exception { final MethodSignature sig = new MethodSignature(Echo.class.getMethod("echoBack", String.class)); assertTrue(sig.equals(sig)); assertFalse(sig.equals("echoBack")); assertEquals(sig, new MethodSignature(Echo.class.getMethod("echoBack", String.class))); assertEquals(sig, new MethodSignature(DuplicateEcho.class.getMethod("echoBack", String.class))); assertFalse(sig.equals(new MethodSignature(Echo.class.getMethod("echoBack", String.class, String.class)))); assertFalse(sig.equals(new MethodSignature(Echo.class.getMethod("echo")))); }