@Test
    public void testPut() throws InterruptedException {
        Document document = new Document(getType(), "id:ns:yalla::balla");
        document.setFieldValue("blahblah", new StringFieldValue("This is a test."));
        PutDocumentMessage message = new PutDocumentMessage(new DocumentPut(document));

        assertTrue(sendMessage("foobar", message));

        Message msg = remoteServer.awaitMessage(60, TimeUnit.SECONDS);
        assertNotNull(msg);
        remoteServer.ackMessage(msg);
        Reply reply = driver.client().awaitReply(60, TimeUnit.SECONDS);
        assertNotNull(reply);

        assertTrue((msg instanceof PutDocumentMessage));
        PutDocumentMessage put = (PutDocumentMessage) msg;
        Document outDoc = put.getDocumentPut().getDocument();

        assertEquals(document, outDoc);
        assertFalse(reply.hasErrors());
    }
@author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
docproc/src/test/java/com/yahoo/docproc/jdisc/DocumentProcessingHandlerBasicTestCase.java