@Test
    public void testHashCode() {
        Book book1 = new Book(new DocumentId("id:book:book::0"));
        Book book2 = new Book(new DocumentId("id:book:book::0"));
        assertNull(book1.getAuthor());
        assertEquals(book1.hashCode(), book2.hashCode());
        book2.setAuthor("Bill");
        assertNotSame(book1.hashCode(), book2.hashCode());
        
    }
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