@Test
    public void testConcreteProxyDoc() {
        Book book = getBook();
        Map<String, String> fieldMap = new HashMap<>();
        fieldMap.put("t", "title");
        fieldMap.put("a", "author");
        fieldMap.put("i", "isbn");
        fieldMap.put("y", "year");
        DocumentProcessor dp = new BookProcessor();
        ProxyDocument proxiedBook = new ProxyDocument(dp, book, fieldMap);
        dp.process(Processing.of(new DocumentPut(proxiedBook)));
        assertEquals(proxiedBook.getFieldValue("title").getWrappedValue(), "The T");
        assertEquals(book.getFieldValue("title").getWrappedValue(), "The T");
        assertEquals(book.getTitle(), "The T");
        assertNull(book.getAuthor());
        assertNull(book.getFieldValue("author"));
        assertEquals(book.getYear(), (Integer)2011);
        assertEquals(book.getFieldValue("year").getWrappedValue(), 2011);
        assertEquals(book.getIsbn(), "ISBN YEP");
        assertEquals(book.getFieldValue("isbn"), new StringFieldValue("ISBN YEP"));
    }
Tests vespa-documentgen-plugin

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