@Test(expected = DeserializationException.class)
    public void testIllegalCharacterInStrings() throws Exception {
        DocumentTypeManager dtm = new DocumentTypeManager();

        DocumentType type = new DocumentType("foo");
        type.addField(new Field("title", DataType.STRING));

        dtm.registerDocumentType(type);

        String input =
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                        "<vespafeed>\n" +
                        "    <document documenttype=\"foo\" documentid=\"id:ns:foo::baz\"> \n" +
                        "        <title>test\uFDDFTitle</title>\n" +
                        "    </document>\n" +
                        "</vespafeed>\n";

        VespaXMLFeedReader parser = new VespaXMLFeedReader(new ByteArrayInputStream(Utf8.toBytes(input)), dtm);
        parser.readAll();
    }
Simple test case for Vespa XML parser.

@author sveina
document/src/test/java/com/yahoo/vespaxmlparser/VespaXMLReaderTestCase.java