The following generates invalid XML because it's missing the xs namespace declaration:
 DocumentMetadataHandle metadataHandle = new DocumentMetadataHandle();
 DocumentMetadataHandle.DocumentProperties props = metadataHandle.getProperties();
 properties.put(QName.valueOf("test"), "test");
 System.out.println("Invalid XML: " + metadataHandle);