pref.node("child2/grandchild");
assertTrue(pref.nodeExists("child2/grandchild"));
}
public void test_nodeExists() throws BackingStoreException {
AbstractPreferences test = (AbstractPreferences) Preferences.userRoot()
.node("test");
try {
test.nodeExists(null);
fail("should throw NullPointerException");
} catch (NullPointerException e) {
// Expected
}
test.removeNode();
try {
test.nodeExists(null);
fail("should throw NullPointerException");
} catch (NullPointerException e) {
// Expected
}
}