### Question:
BasicNamespace implements NamespaceRegistry.Namespace { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof Namespace) { Namespace that = (Namespace)obj; if (!this.namespaceUri.equals(that.getNamespaceUri())) return false; return true; } return false; } BasicNamespace( String prefix,
                           String namespaceUri ); String getNamespaceUri(); String getPrefix(); @Override int hashCode(); int compareTo( Namespace that ); @Override boolean equals( Object obj ); @Override String toString();  }### Answer:
@Test public void shouldConsiderAsEqualAnyNamespacesWithSameUri() { assertThat(ns1.equals(ns3), is(true)); assertThat(ns3.equals(ns1), is(true)); assertThat(ns2.equals(ns4), is(true)); assertThat(ns4.equals(ns2), is(true)); assertThat(ns5.equals(ns5), is(true)); }
@Test public void shouldNotConsiderAsEqualAnyNamespacesWithDifferentUris() { assertThat(ns1.equals(ns2), is(false)); assertThat(ns2.equals(ns1), is(false)); assertThat(ns3.equals(ns4), is(false)); assertThat(ns4.equals(ns3), is(false)); }