@Test
public final void testIsTopicName() {

    // @see http://design.ros2.org/articles/topic_and_service_names.html
    logger.debug(new Object(){}.getClass().getEnclosingMethod().getName());
    // must not be empty
    Assert.assertFalse("Topic must not be null.", GraphName.isValidTopic(null));
    Assert.assertFalse("Topic must not be empty.", GraphName.isValidTopic(""));
    // may contain alphanumeric characters ([0-9|a-z|A-Z]), underscores (_), or forward slashes (/)
      Assert.assertFalse("Topic can be contains valid charactere.", GraphName.isValidTopic("&é'(-èçà)=#[|\^@]^$ù*,;:!£%µ?.§"));
    Assert.assertTrue("Topic may contains valid charactere.", GraphName.isValidTopic("~/_foo"));
    Assert.assertTrue("Topic may contains valid charactere.", GraphName.isValidTopic("azertyuiopqsdfghjklmwxcvbn1234567890"));
    // may use balanced curly braces ({}) for substitutions
    Assert.assertTrue("Topic may use balanced curly braces.", GraphName.isValidTopic("{bar}"));
    // may start with a tilde (~), the private namespace substitution character
    Assert.assertTrue("Topic may start with a tilde (~)", GraphName.isValidTopic("~/foo"));
    Assert.assertFalse("Topic may start with a tilde (~).", GraphName.isValidTopic("foo~"));
    // must not start with a numeric character ([0-9])
    Assert.assertFalse("Topic must not start with a numeric character ([0-9]).", GraphName.isValidTopic("8foo"));
    // must not contain any number of repeated underscores (_)
    Assert.assertFalse("Topic must not contain any number of repeated underscores (_).", GraphName.isValidTopic("foo__bar"));
    // must not end with an underscore (_)
    Assert.assertFalse("Topic must not end with an underscore (_).", GraphName.isValidTopic("foo_"));
    // must not have an underscore (_) followed by a forward slash (/), i.e. _/
    Assert.assertFalse("Topic must not have an underscore (_) followed by a forward slash.", GraphName.isValidTopic("foo_/bar"));
    // must not end with a forward slash (/)
    Assert.assertFalse("Topic must not end with a forward slash (/).", GraphName.isValidTopic("foo/bar/"));
    // must not contain any number of repeated forward slashes (/)
    Assert.assertFalse("Topic must not contain any number of repeated forward slashes (/).", GraphName.isValidTopic("foo//bar"));
    // must separate a tilde (~) from the rest of the name with a forward slash (/), i.e. ~/foo not ~foo
    Assert.assertFalse("Topic must separate a tilde (~) from the rest of the name with a forward slash (/).", GraphName.isValidTopic("~foo"));
    // must have balanced curly braces ({}) when used, i.e. {sub}/foo but not {sub/foo nor /foo}
    Assert.assertTrue("Topic must have balanced curly braces ({}) when used.", GraphName.isValidTopic("~/foo"));
    // Test case Valid
    Assert.assertTrue(GraphName.isValidTopic("foo"));
    Assert.assertTrue(GraphName.isValidTopic("abc123"));
    Assert.assertTrue(GraphName.isValidTopic("_foo"));
    Assert.assertTrue(GraphName.isValidTopic("Foo"));
    Assert.assertTrue(GraphName.isValidTopic("BAR"));
    Assert.assertTrue(GraphName.isValidTopic("~"));
    Assert.assertTrue(GraphName.isValidTopic("foo/bar"));
    Assert.assertTrue(GraphName.isValidTopic("~/foo"));
    Assert.assertTrue(GraphName.isValidTopic("{foo}_bar"));
    Assert.assertTrue(GraphName.isValidTopic("foo/{ping}/bar"));
    Assert.assertTrue(GraphName.isValidTopic(Topics.SCHEME + "/foo"));
    Assert.assertTrue(GraphName.isValidTopic(Topics.SCHEME + "foo/bar"));
    // Test case not valid
    Assert.assertFalse(GraphName.isValidTopic("123abc"));
    Assert.assertFalse(GraphName.isValidTopic("123"));
    Assert.assertFalse(GraphName.isValidTopic("__foo"));
    Assert.assertFalse(GraphName.isValidTopic("foo__bar"));
    Assert.assertFalse(GraphName.isValidTopic("foo bar"));
    Assert.assertFalse(GraphName.isValidTopic("foo__"));
    Assert.assertFalse(GraphName.isValidTopic(" "));
    Assert.assertFalse(GraphName.isValidTopic("foo_"));
    Assert.assertFalse(GraphName.isValidTopic("foo//bar"));
    Assert.assertFalse(GraphName.isValidTopic("foo/"));
    Assert.assertFalse(GraphName.isValidTopic("foo_/bar	"));
    Assert.assertFalse(GraphName.isValidTopic("~foo"));
    Assert.assertFalse(GraphName.isValidTopic("foo~"));
    Assert.assertFalse(GraphName.isValidTopic("foo~/bar"));
    Assert.assertFalse(GraphName.isValidTopic("foo/~bar"));
    Assert.assertFalse(GraphName.isValidTopic("/_/bar"));
    Assert.assertFalse(GraphName.isValidTopic("_"));
    Assert.assertFalse(GraphName.isValidTopic("_/_bar"));
    Assert.assertFalse(GraphName.isValidTopic("/~"));
    Assert.assertFalse(GraphName.isValidTopic("foo/~/bar"));
}