@Test
    public void testDocumentIdWithNonTextCharacterCanBeDeserialized() {
        DocumentIdFixture f = new DocumentIdFixture();

        // Document id = "id:a:b::0x7c"
        String docId = new String(new byte[]{105, 100, 58, 97, 58, 98, 58, 58, 7, 99}, StandardCharsets.UTF_8);
        f.serialize(docId);

        Document result = f.deserialize();
        assertEquals(docId, result.getId().toString());
    }
Test for Document and all its features, including (de)serialization.

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