@Test
    public void testNews4() throws Exception {
        // Test on adding just a few fields to a DocumentUpdate (implies other fields to null)
        VespaXMLFeedReader parser = new VespaXMLFeedReader("src/test/vespaxmlparser/test04.xml", manager);

        FeedOperation op = parser.read();

        assertEquals(FeedOperation.Type.UPDATE, op.getType());

        DocumentUpdate docUpdate = op.getDocumentUpdate();
        //url
        assertEquals(new StringFieldValue("assignUrl"), docUpdate.getFieldUpdate("url").getValueUpdate(0).getValue());

        //title
        assertNull(docUpdate.getFieldUpdate("title"));

        //last_downloaded
        assertNull(docUpdate.getFieldUpdate("last_downloaded"));

        //value_long
        assertEquals(new LongFieldValue((long)2), docUpdate.getFieldUpdate("value_long").getValueUpdate(0).getValue());

        //value_content
        assertNull(docUpdate.getFieldUpdate("value_content"));

        //stringarr
        List stringarr = (List)docUpdate.getFieldUpdate("stringarr").getValueUpdate(0).getValue();
        assertEquals(new StringFieldValue("assignString1"), stringarr.get(0));
        assertEquals(new StringFieldValue("assignString2"), stringarr.get(1));

        //intarr
        List intarr = (List)docUpdate.getFieldUpdate("intarr").getValueUpdate(0).getValue();
        assertEquals(new IntegerFieldValue(3), intarr.get(0));
        assertEquals(new IntegerFieldValue(4), intarr.get(1));

        //longarr
        assertNull(docUpdate.getFieldUpdate("longarr"));

        //bytearr
        assertNull(docUpdate.getFieldUpdate("bytearr"));

        //floatarr
        assertNull(docUpdate.getFieldUpdate("floatarr"));

        //weightedsetint
        WeightedSet weightedsetint =
                (WeightedSet)docUpdate.getFieldUpdate("weightedsetint").getValueUpdate(0).getValue();
        assertEquals(Integer.valueOf(11), weightedsetint.get(new IntegerFieldValue(11)));
        assertEquals(Integer.valueOf(12), weightedsetint.get(new IntegerFieldValue(12)));

        //weightedsetstring
        assertNull(docUpdate.getFieldUpdate("weightedsetstring"));
    }
Simple test case for Vespa XML parser.

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