@Test
    public void testAnnotatorConsumer() {
        DocumentTypeManager manager = new DocumentTypeManager();
        DocumentTypeManagerConfigurer
                .configure(manager, "file:src/test/java/com/yahoo/document/datatypes/documentmanager.blog.sd");

        DocumentType blogType = manager.getDocumentType("blog");
        Document doc = new Document(blogType, "id:ns:blog::http://blogs.sun.com/praveenm");
        doc.setFieldValue("url", new StringFieldValue("http://blogs.sun.com/praveenm"));
        doc.setFieldValue("title", new StringFieldValue("Beginning JavaFX"));
        doc.setFieldValue("author", new StringFieldValue("Praveen Mohan"));
        doc.setFieldValue("body", new StringFieldValue(
                "JavaFX can expand its wings across different domains such as manufacturing, logistics, retail, etc. Many companies have adopted it - IBM, Oracle, Yahoo, Honeywell. Even the non-IT industries such as GE, WIPRO, Ford etc. So it is a success for Christopher Oliver and Richard Bair. Scott Mcnealy is happy"));

        doc = annotate(doc, manager);
        doc = serializeAndDeserialize(doc, manager);
    }
Test for bug 4066566. No assertions, but works if it runs without exceptions.
document/src/test/java/com/yahoo/document/datatypes/StringTestCase.java