@Test
    public void testRequireThatDocumentWithIdSchemaIdChecksType() {
        DocumentType docType = new DocumentType("mytype");
        new Document(docType, "id:namespace:mytype::foo");
        assertThrows(IllegalArgumentException.class,
                     () -> new Document(docType, "id:namespace:wrong-type::foo"));
    }
Test for Document and all its features, including (de)serialization.

@author Thomas Gundersen
@author bratseth
document/src/test/java/com/yahoo/document/DocumentTestCase.java