private void verifyArrayOfStruct(Book book) {
        assertEquals(book.getMysinglestructarray().get(0).getS1(), "YEPS");
        assertEquals(book.getMysinglestructarray().get(1).getI1(), (Integer)456);
        Struct s1 = (Struct) ((Array)book.getFieldValue("mysinglestructarray")).get(0);
        Struct s2 = (Struct) ((Array)book.getFieldValue("mysinglestructarray")).get(1);
        StringFieldValue sfv1 = (StringFieldValue) s1.getFieldValue("s1");
        IntegerFieldValue ifv1 = (IntegerFieldValue) s1.getFieldValue("i1");
        StringFieldValue sfv2 = (StringFieldValue) s2.getFieldValue("s1");
        IntegerFieldValue ifv2 = (IntegerFieldValue) s2.getFieldValue("i1");
        assertEquals(sfv1.getString(), "YEPS");
        assertEquals(sfv2.getString(), "JA");
        assertEquals(ifv1.getInteger(), 789);
        assertEquals(ifv2.getInteger(), 456);
        s2.setFieldValue("i1", new IntegerFieldValue(123));
        assertEquals(book.getMysinglestructarray().get(1).getI1(), (Integer)123);
        Book.Ss1 prev = book.getMysinglestructarray().remove(0);
        assertEquals(book.getMysinglestructarray().get(0).getI1(), (Integer)123);
        book.getMysinglestructarray().add(0, prev);
        assertEquals(book.getMysinglestructarray().get(1).getI1(), (Integer)123);
        s2.setFieldValue("i1", new IntegerFieldValue(456));
    }
Tests vespa-documentgen-plugin

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