@Test
    public void testNoType() {
        try {
            new Document(null, new DocumentId("id:null:type::URI"));
            fail("Should have gotten an Exception");
        } catch (NullPointerException | IllegalArgumentException e) {
            // Success
        }
    }
Test for Document and all its features, including (de)serialization.

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