@Test
    public void testPositionType() {
        Music4 book = new Music4(new DocumentId("id:music4:music4::0"));
        book.setPos(new Music4.Position().setX(7).setY(8));
        assertEquals(new Music4.Position().setX(7).setY(8), book.getPos());
        assertEquals(1, book.getFieldCount());
        int numIteratedValues = 0;
        for (Iterator<Map.Entry<Field, FieldValue>> it = book.iterator(); it.hasNext(); numIteratedValues++) {
            Map.Entry<Field, FieldValue> entry = it.next();
        }
        assertEquals(book.getFieldCount(), numIteratedValues);
        Field posZcurve = book.getField(PositionDataType.getZCurveFieldName("pos"));
        assertNotNull(posZcurve);
        assertNotEquals(book.getDataType().fieldSet(), book.getDataType().fieldSetAll());
        assertFalse(book.getDataType().fieldSet().contains(posZcurve));
        assertTrue(book.getDataType().fieldSetAll().contains(posZcurve));
        assertTrue(book.getDataType().getFields().contains(posZcurve));
    }
Packs the given doc to Book
@param d doc, never null
@return a Book object or null if input doc isn't a Book
documentgen-test/src/test/java/com/yahoo/vespa/config/DocumentGenPluginTest.java