Code example for Attr

Methods: setUserData

    public void testUserDataHandlerNotifiedOfRenames() { 
        RecordingHandler handler = new RecordingHandler();
        description.setUserData("a", "apple", handler);
        deluxe.setUserData("b", "banana", handler);
        standard.setUserData("c", "cat", handler);
        document.renameNode(deluxe, null, "special");
        document.renameNode(description, null, "desc");
        Set<String> expected = new HashSet<String>();
        expected.add(notification(NODE_RENAMED, "a", "apple", description, null));
        expected.add(notification(NODE_RENAMED, "b", "banana", deluxe, null));
        assertEquals(expected, handler.calls);
    public void testRenameToInvalid() { 
        try { 
            document.renameNode(description, null, "xmlns:foo");
Connect your IDE to all the code out there  Get Codota for Java