public void writeCallSite(CallSiteReference callSiteReference) throws IOException {
        writeSimpleName(callSiteReference.getName());
        writer.write('(');
        writeQuotedString(callSiteReference.getMethodName());
        writer.write(", ");
        writeMethodProtoDescriptor(callSiteReference.getMethodProto());

        for (EncodedValue encodedValue : callSiteReference.getExtraArguments()) {
            writer.write(", ");
            writeEncodedValue(encodedValue);
        }
        writer.write(")@");
        MethodHandleReference methodHandle = callSiteReference.getMethodHandle();
        if (methodHandle.getMethodHandleType() != MethodHandleType.INVOKE_STATIC) {
            throw new IllegalArgumentException("The linker method handle for a call site must be of type invoke-static");
        }
        writeMethodDescriptor((MethodReference)callSiteReference.getMethodHandle().getMemberReference());
    }
@Test
    public void testWriteCallsite() throws IOException {
        DexFormattedWriter writer = new DexFormattedWriter(output);

        writer.writeCallSite(getCallSiteReference());

        Assert.assertEquals(
                "callsiteName(\"callSiteMethodName\", " +
                        "(Lparam1;Lparam2;)Lreturn/type;, Ldefining/class;->fieldName:Lfield/type;, " +
                        "Ldefining/class;->methodName(Lparam1;Lparam2;)Lreturn/type;)@" +
                        "Ldefining/class;->methodName(Lparam1;Lparam2;)Lreturn/type;",
                output.toString());
    }