MethodId { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(getPrefix()); stringBuilder.append(UNDERSCORE); stringBuilder.append(this.returnType); for (Class<?> parameterType : parameterTypes) { stringBuilder.append(UNDERSCORE); stringBuilder.append(parameterType.getName()); } return stringBuilder.toString(); } private  MethodId();  MethodId(Method method); static MethodId fromIdentifier(String identifier); String getPrefix(); String getClassName(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); String getMethodName(); Class<?>[] getParameterTypes(); static final String UNDERSCORE; }
@Test public void testToString_withInnerClassAsParameter() throws Exception { final MethodId methodId = new MethodId(SimpleWorkflowForTest.class.getDeclaredMethod("simpleStringModifyingTask", SimpleWorkflowForTest.StringEvent.class)); assertThat(methodId.toString()).isEqualTo("com.flipkart.flux.client.intercept.SimpleWorkflowForTest_simpleStringModifyingTask_com.flipkart.flux.client.intercept.SimpleWorkflowForTest.StringEvent_com.flipkart.flux.client.intercept.SimpleWorkflowForTest$StringEvent"); }
@Test public void testToString_withPublicClassAsParameter() throws Exception { final MethodId methodId = new MethodId(SimpleWorkflowForTest.class.getDeclaredMethod("badWorkflowWithNonEventParams", String.class)); assertThat(methodId.toString()).isEqualTo("com.flipkart.flux.client.intercept.SimpleWorkflowForTest_badWorkflowWithNonEventParams_void_java.lang.String"); }