public static Namespace of(String... levels) {
    Preconditions.checkArgument(null != levels, "Cannot create Namespace from null array");
    if (levels.length == 0) {
      return empty();
    }

    for (String level : levels) {
      Preconditions.checkNotNull(level, "Cannot create a namespace with a null level");
      Preconditions.checkArgument(
          !CONTAINS_NULL_CHARACTER.test(level),
          "Cannot create a namespace with the null-byte character");
    }

    return new Namespace(levels);
  }
@Test
  public void testWithNullInLevel() {
    assertThatThrownBy(() -> Namespace.of("a", null, "b"))
        .isInstanceOf(NullPointerException.class)
        .hasMessage("Cannot create a namespace with a null level");
  }