@Test
public void checksIfValidNamespaceName() {

    assertFalse(ShapeId.isValidNamespace("foo.bar."));
    assertFalse(ShapeId.isValidNamespace(".foo.bar"));
    assertFalse(ShapeId.isValidNamespace("foo.bar#baz"));
    assertFalse(ShapeId.isValidNamespace("1foo.bar"));
    assertFalse(ShapeId.isValidNamespace("foo.1bar"));
    assertFalse(ShapeId.isValidNamespace("foo.bar.1"));
    assertFalse(ShapeId.isValidNamespace("foo.bar.*"));
    assertFalse(ShapeId.isValidNamespace("foo.bar.."));
    assertFalse(ShapeId.isValidNamespace(""));
    assertTrue(ShapeId.isValidNamespace("foo"));
    assertTrue(ShapeId.isValidNamespace("Foo.bar"));
    assertTrue(ShapeId.isValidNamespace("foo._bar"));
    assertTrue(ShapeId.isValidNamespace("foo.bar"));
    assertTrue(ShapeId.isValidNamespace("foo.bar1"));
    assertTrue(ShapeId.isValidNamespace("_foo.bar"));
    assertTrue(ShapeId.isValidNamespace("f.b"));
    assertTrue(ShapeId.isValidNamespace("f.b1.c_d"));
    assertTrue(ShapeId.isValidNamespace("f.b1.c_d_.e"));
    assertTrue(ShapeId.isValidNamespace("f.b1.c_d_.e"));
    assertTrue(ShapeId.isValidNamespace("f.b1.c_d_1234.e"));
}