### Question:
Name { public static Name of(final String... parts) { Reject.ifTrue(parts.length == 0); Name name = null; for (String part : parts) { name = new Name(name, part); } return name; } private  Name(final Name parent, final String leaf); static Name of(final String... parts); static Name of(final Class<?> type); Name getParent(); String getLeaf(); Name child(final String name); Name decorated(final String decorator); String getFullyQualifiedName(); String getScopedName(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test(expectedExceptions = NullPointerException.class) public void shouldFailForNullLocalName() throws Exception { Name.of((String) null); }
@Test public void shouldBeEquals() throws Exception { assertThat(Name.of("a")).isEqualTo(Name.of("a")); assertThat(Name.of("a", "b")).isEqualTo(Name.of("a", "b")); }