ExtensionSegmentSet { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final ExtensionSegmentSet that = (ExtensionSegmentSet) o; if (!extension.equals(that.extension)) return false; if (!extensionMethod.equals(that.extensionMethod)) return false; if (!namespace.equals(that.namespace)) return false; return true; } ExtensionSegmentSet(final String namespace, final String extension);  ExtensionSegmentSet(final String namespace, final String extension, final String extensionMethod);  ExtensionSegmentSet(final UriInfo uriInfo, final ExtensionPoint extensionPoint); boolean isValidFormat(); String getNamespaceAndExtension(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); String getNamespace(); String getExtension(); String getExtensionMethod();  }
@Test public void equalsValid() { ExtensionSegmentSet extensionSegmentSet = new ExtensionSegmentSet("ns", "ext", "meth"); ExtensionSegmentSet extensionSegmentSetSame = new ExtensionSegmentSet("ns", "ext", "meth"); Assert.assertTrue(extensionSegmentSet.equals(extensionSegmentSetSame)); }
@Test public void equalsInvalid() { ExtensionSegmentSet extensionSegmentSet = new ExtensionSegmentSet("ns", "ext", "meth"); ExtensionSegmentSet extensionSegmentSetSame = new ExtensionSegmentSet("ns", "ext", "different method"); Assert.assertFalse(extensionSegmentSet.equals(extensionSegmentSetSame)); }