try {
            attr.appendChild(docType);
            fail("Must throw exception.");
        } catch (final DOMException e) {
            assertNull(docType.getParentNode());