### Question:
VertexLabel { public boolean isInNamespace(String... namespace) { if (namespace.length > this.namespace.size()) { return false; } for (int i = 0; i < namespace.length; i++) { if (!this.namespace.get(i).equals(namespace[i])) { return false; } } return true; } VertexLabel(String name);  VertexLabel(String outer, String... inner);  VertexLabel(List<String> namespace, String name); boolean isInNamespace(String... namespace); VertexLabel withExtraNamespace(String topLevelNamespace); VertexLabel withoutOuterNamespace(); Optional<String> getOuterNamespace(); String getUnqualifiedName(); String getQualifiedName(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static VertexLabel parseLabel(String label);  }### Answer:
@Test public void isInNamespaceOfEqualValue() { VertexLabel label = new VertexLabel("outer", "inner", "foo"); assertTrue(label.isInNamespace("outer", "inner")); }
@Test public void isInSuperNamespace() { VertexLabel label = new VertexLabel("outer", "inner", "foo"); assertTrue(label.isInNamespace("outer")); }
@Test public void isNotInSubNamespace() { VertexLabel label = new VertexLabel("outer", "foo"); assertFalse(label.isInNamespace("outer", "inner")); }
@Test public void isNotInNamespaceWithDifferentOuter() { VertexLabel label = new VertexLabel("outer", "inner", "foo"); assertFalse(label.isInNamespace("differentOuter", "inner")); }
@Test public void isNotInNamespaceWithDifferentInner() { VertexLabel label = new VertexLabel("outer", "inner", "foo"); assertFalse(label.isInNamespace("outer", "differentInner")); }
@Test public void isNotInNamespaceWithMissingOuter() { VertexLabel label = new VertexLabel("outer", "inner", "foo"); assertFalse(label.isInNamespace("inner")); }