### Question:
MethodSignature implements Serializable { @Override public String toString() { return internal; } MethodSignature(Method method); Method toMethod(Class<?> type); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testToString() throws Exception { assertEquals("echo()", new MethodSignature(Echo.class.getMethod("echo")).toString()); assertEquals("echoBack(Ljava/lang/String;)", new MethodSignature(Echo.class.getMethod("echoBack", String.class)).toString()); assertEquals("echoBack([Ljava/lang/String;)", new MethodSignature(Echo.class.getMethod("echoBack", String[].class)).toString()); assertEquals("echoBack([[Ljava/lang/String;)", new MethodSignature(Echo.class.getMethod("echoBack", String[][].class)).toString()); assertEquals("echoBack([[[Ljava/lang/String;)", new MethodSignature(Echo.class.getMethod("echoBack", String[][][].class)).toString()); assertEquals("echoBack(I)", new MethodSignature(Echo.class.getMethod("echoBack", int.class)).toString()); assertEquals("echoBack(Z)", new MethodSignature(Echo.class.getMethod("echoBack", boolean.class)).toString()); assertEquals("echoBack(Ljava/lang/String;Ljava/lang/String;)", new MethodSignature(Echo.class.getMethod("echoBack", String.class, String.class)).toString()); assertEquals("illegalArgument()", new MethodSignature(Echo.class.getMethod("illegalArgument")).toString()); assertEquals("ioException()", new MethodSignature(Echo.class.getMethod("ioException")).toString()); }