@Test
    public void reference_field_has_correct_reference_data_type() {
        final Book book = getBook();
        final Field field = book.getField("ref");
        assertEquals(ReferenceDataType.createWithInferredId(Parent.type), field.getDataType());
    }
Tests vespa-documentgen-plugin

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