public void testExtensibleNode() {
// Add a new ID type
Assert.assertTrue(Node.NodeIDType.registerIDType("FOO", Integer.class));
-
+
// Trying to re-register the node must fail
Assert.assertFalse(Node.NodeIDType.registerIDType("FOO",
Integer.class));
// Got an unexpected exception
Assert.assertTrue(false);
}
-
+
// Now unregister the type and make sure the node doesn't get
// created
Node.NodeIDType.unRegisterIDType("FOO");