private void verifyMaps(Book book) {
        assertTrue(book.getField("stringmap").getDataType() instanceof MapDataType);
        MapFieldValue mfv = (MapFieldValue) book.getFieldValue("stringmap");
        assertEquals(mfv.get(new StringFieldValue("Melville")), new StringFieldValue("Moby Dick"));
        book.getStringmap().put("Melville", "Moby Dick Or The Whale");
        assertEquals(mfv.get(new StringFieldValue("Melville")), new StringFieldValue("Moby Dick Or The Whale"));
        book.getStringmap().remove("Melville");
        assertEquals(mfv.keySet().size(), 2);
        book.getStringmap().put("Melville", "MD");
        assertEquals(mfv.keySet().size(), 3);
        book.getStringmap().put("Melville", "Moby Dick");
        assertEquals(mfv.keySet().size(), 3);

        assertEquals(book.getStructmap().get(50).getS1(), "test s1");
        MapFieldValue mfv2 = (MapFieldValue) book.getFieldValue("structmap");
        Struct fifty = (Struct)(mfv2.get(new IntegerFieldValue(50)));
        assertEquals(fifty.getFieldValue("s1").getWrappedValue(), "test s1");
        assertEquals(((Ss1)mfv2.get(new IntegerFieldValue(50))).getS1(), "test s1");
    }
Tests vespa-documentgen-plugin

@author vegardh
documentgen-test/src/test/java/com/yahoo/vespa/config/DocumentGenPluginTest.java