@Before
    public void setUp() {
        docMan = new DocumentTypeManager();

        docType = new DocumentType("foobar");
        docType.addField(new Field("num", DataType.INT));
        docType.addField(new Field("num2", DataType.DOUBLE));
        docType.addField(new Field("strfoo", DataType.STRING));

        DataType stringarray = DataType.getArray(DataType.STRING);
        docType.addField(new Field("strarray", stringarray));

        DataType stringwset = DataType.getWeightedSet(DataType.STRING);
        docType.addField(new Field("strwset", stringwset));

        StructDataType mystructType = new StructDataType("mystruct");
        mystructType.addField(new Field("title", DataType.STRING));
        mystructType.addField(new Field("rating", DataType.INT));

        DataType structmap = new MapDataType(DataType.STRING, mystructType);
        docType.addField(new Field("structmap", structmap));

        DataType structarray = new ArrayDataType(mystructType);
        docType.addField(new Field("structarray", structarray));

        DataType strmap = new MapDataType(DataType.STRING, DataType.STRING);
        docType.addField(new Field("strmap", strmap));

        docType.addField(new Field("struct", mystructType));

        docMan.register(docType);

        docType2 = new DocumentType("otherdoctype");
        docType2.addField(new Field("strinother", DataType.STRING));
        docMan.register(docType2);
    }
Tests applying and serializing document updates.

@author Einar M R Rosenvinge
document/src/test/java/com/yahoo/document/DocumentPathUpdateTestCase.java