Code example for AbstractPreferences

Methods: node, parent

0
            // Expected 
        } 
    } 
 
    public void testParent() throws BackingStoreException { 
        AbstractPreferences node = (AbstractPreferences) pref.node("First node/sub node");
 
        assertTrue(node.parent().name().compareTo("First node") == 0);
 
        pref.removeNode();
 
        try { 
            node.parent();
            fail("IllegalStateException expected");
        } catch (IllegalStateException e) {
            //expected 
        } 
    } 
 
    public void testNode() throws BackingStoreException { 
        AbstractPreferences first = (AbstractPreferences) pref.node("First node");