### Question:
VersionRange implements IComparable <VersionRange> { @Override public boolean equals (final Object o) { if (o == this) return true; if (o == null || !getClass ().equals (o.getClass ())) return false; final VersionRange rhs = (VersionRange) o; return m_bIncludeFloor == rhs.m_bIncludeFloor && m_aFloorVersion.equals (rhs.m_aFloorVersion) && m_bIncludeCeil == rhs.m_bIncludeCeil && EqualsHelper.equals (m_aCeilVersion, rhs.m_aCeilVersion); } VersionRange(@Nonnull final Version aFloorVersion, @Nullable final Version aCeilingVersion);  VersionRange(@Nonnull final Version aFloorVersion,
                       final boolean bIncludeFloorVersion,
                       @Nullable final Version aCeilingVersion,
                       final boolean bIncludeCeilingVersion); @Nonnull static VersionRange parse(@Nullable final String sVersionString); boolean isIncludingFloor(); @Nullable Version getFloorVersion(); boolean isIncludingCeil(); @Nullable Version getCeilVersion(); boolean versionMatches(@Nonnull final Version rhs); int compareTo(@Nonnull final VersionRange rhs); @Nonnull String getAsString(); @Nonnull String getAsString(final boolean bPrintZeroElements); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); static final String DEFAULT_VERSION_RANGE_STRING; }### Answer:
@Test public void testEquals () { final VersionRange vr1 = VersionRange.parse ("(1.2,2.0]"); assertEquals (vr1, vr1); assertNotEquals (vr1, null); assertNotEquals (vr1, "Not a VersionRange"); CommonsTestHelper.testDefaultImplementationWithEqualContentObject (vr1, VersionRange.parse ("(1.2,2.0]")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (vr1, VersionRange.parse ("[1.2,2.0]")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (vr1, VersionRange.parse ("(1.2,2.0)")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (vr1, VersionRange.parse ("[1.2,2.0)")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (vr1, VersionRange.parse ("(1.2,]")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (vr1, VersionRange.parse ("(,2.0]")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (vr1, VersionRange.parse ("(1.3,2.0]")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (vr1, VersionRange.parse ("(1.2,2.1]")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (VersionRange.parse ("(,2.0]"), VersionRange.parse ("(,2.1]")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (VersionRange.parse ("(1.2]"), VersionRange.parse ("(1.3]")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (VersionRange.parse ("(1.2,]"), VersionRange.parse ("(,2.0]")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (VersionRange.parse ("(,2.0]"), VersionRange.parse ("(1.2,]")); CommonsTestHelper.testDefaultImplementationWithEqualContentObject (VersionRange.parse ("(1.2]"), VersionRange.parse ("(1.2]")); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (VersionRange.parse ("(1.2]"), VersionRange.parse ("(1.2)")); }