GraphName { public static boolean isValidFQDN(final String fqn) { boolean result = fqn != null; if (result) { final String topicName = GraphName.removeSheme(fqn); result = GraphName.isValidTopic(topicName) && topicName.startsWith(SEPARATOR) && !topicName.contains(RELATIVE) && !topicName.contains(PARAMETER); } return result; } private  GraphName(); static void addNode(final Node node); static void removeNode(final Node node); static void dispose(); static String getFullName(final String nameSpace, final String nodeName); static String getFullName(final Node node, final String name, final List<String> options); static boolean isValidTopic(final String name); static boolean isValidSubstitution(final String substitution); static boolean isValidFQDN(final String fqn);  }
@Test public final void testIsTopicFQN() { logger.debug(new Object(){}.getClass().getEnclosingMethod().getName()); Assert.assertTrue("FQN must start with a forward slash.", GraphName.isValidFQDN("/foo")); Assert.assertFalse("FQN must start with a forward slash.", GraphName.isValidFQDN("foo")); Assert.assertFalse("FQN must not contain tilde.", GraphName.isValidFQDN("~foo")); Assert.assertFalse("FQN must not contain curly braces.", GraphName.isValidFQDN("foo/{bar}")); Assert.assertTrue(GraphName.isValidFQDN("/foo")); Assert.assertTrue(GraphName.isValidFQDN("/bar/baz")); Assert.assertTrue(GraphName.isValidFQDN(Topics.SCHEME + "/ping")); Assert.assertTrue(GraphName.isValidFQDN("/_private/thing")); Assert.assertTrue(GraphName.isValidFQDN("/public_namespace/_private/thing")); }