### Question:
ServiceMethod { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getName()).append("("); boolean first = true; for (DataDescription argument : getArguments()) { if (!first) { sb.append(", "); } else { first = false; } sb.append(argument.getType().getSimpleName()) .append(" ") .append(argument.getName()); } sb.append(")"); if (!getResults().isEmpty()) { sb.append(": "); } first = true; for (DataDescription result : getResults()) { if (!first) { sb.append(", "); } else { first = false; } sb.append(result.getType().getSimpleName()) .append(" ") .append(result.getName()); } return sb.toString(); } ServiceMethod(ServiceMethodDescription serviceMethodDescription, ServiceDescription serviceDescription); final String getName(); final String getDescription(); List<DataDescription> getArguments(); Map<String, DataDescription> getArgumentMap(); List<DataDescription> getResults(); Map<String, DataDescription> getResultMap(); @Override String toString(); Map<String, Object> executeSync(Map<String, Object> arguments); void executeAsync(Map<String, Object> arguments, Consumer<Map<String, Object>> callback, Consumer<Exception> errorCallback);  }### Answer:
@Test public void toString1() { ServiceMethod method = MathService.createMathService().getServiceMethods().get("multiply"); assertThat(method.toString(), equalTo("multiply(Number arg1, Number arg2): Number result")); }
@Test public void toString2() { ServiceMethod method = MathService.createMathService().getServiceMethods().get("add"); assertThat(method.toString(), equalTo("add(Number arg1, Number arg2): Number result")); }