@Test
    @SuppressWarnings("deprecation")
    public void testSingleFieldToXml() {
        Document doc = new Document(docMan.getDocumentType("testdoc"), new DocumentId("id:ns:testdoc::xmltest"));
        doc.setFieldValue("stringattr", new StringFieldValue("hello world"));
        assertEquals("<value>hello world</value>\n", doc.getFieldValue("stringattr").toXml());
    }
Test for Document and all its features, including (de)serialization.

@author Thomas Gundersen
@author bratseth
document/src/test/java/com/yahoo/document/DocumentTestCase.java