public void writeMethodDescriptor(MethodReference methodReference) throws IOException {
        writeType(methodReference.getDefiningClass());
        writer.write("->");
        writeSimpleName(methodReference.getName());
        writer.write('(');
        for (CharSequence paramType: methodReference.getParameterTypes()) {
            writeType(paramType);
        }
        writer.write(')');
        writeType(methodReference.getReturnType());
    }
@Test
    public void testWriteMethodDescriptor() throws IOException {
        DexFormattedWriter writer = new DexFormattedWriter(output);

        writer.writeMethodDescriptor(getMethodReference());

        Assert.assertEquals("Ldefining/class;->methodName(Lparam1;Lparam2;)Lreturn/type;", output.toString());
    }