    @Test
    public void testChangeCallSiteTarget() throws Exception {

        final String expected_answer = "{\"result\":\"ok\",\"calledMethod\":\"changeCallSiteTarget\"}" + END_OF_INSTRUCTION;

        final String sent_call = "changeCallSiteTarget";
        final String sent_methodType = "virtual";
        final String sent_oldTarget = "HelloWorld.tick:(HelloWorld)void";
        final String sent_newTarget = "HelloWorld.tack:()V";

        SocketChannel socket = prepareRequestInjection(expected_answer);

        ArgumentCaptor<ByteBuffer> argument = forClass(ByteBuffer.class);

        TestableClient theClient = new TestableClient(socket);
        boolean ok = theClient.changeCallSiteTarget(sent_methodType, sent_oldTarget, sent_newTarget);
        theClient.disconnect();

        verify(socket).write(argument.capture());
        String sent_message = getAnswerFromBuffer(argument.getValue());

        JSONObject objIn = (JSONObject) JSONValue.parse(sent_message);

        assertEquals(sent_call, objIn.get("call"));
        assertEquals(sent_methodType, objIn.get("methodType"));
        assertEquals(sent_oldTarget, objIn.get("oldTarget"));
        assertEquals(sent_newTarget, objIn.get("newTarget"));
        assertTrue(ok);
    }