### Question:
SingleElementMap implements ICommonsMap <KEYTYPE, VALUETYPE> { @Override public boolean equals (final Object o) { if (o == this) return true; if (o == null || !getClass ().equals (o.getClass ())) return false; final SingleElementMap <?, ?> rhs = (SingleElementMap <?, ?>) o; return m_bHasElement == rhs.m_bHasElement && EqualsHelper.equals (m_aKey, rhs.m_aKey) && EqualsHelper.equals (m_aValue, rhs.m_aValue); } SingleElementMap();  SingleElementMap(@Nullable final KEYTYPE aKey, @Nullable final VALUETYPE aValue); @Nonnull @ReturnsMutableCopy SingleElementMap <KEYTYPE, VALUETYPE> getClone(); void clear(); boolean containsKey(@Nullable final Object aKey); boolean containsValue(@Nullable final Object aValue); @Nullable VALUETYPE get(@Nullable final Object aKey); boolean isEmpty(); @Nullable final VALUETYPE put(@Nullable final KEYTYPE aKey, @Nullable final VALUETYPE aElement); void putAll(@Nullable final Map <? extends KEYTYPE, ? extends VALUETYPE> aMap); @Nullable VALUETYPE remove(@Nullable final Object aKey); @Nonnegative int size(); @ReturnsImmutableObject @Nonnull @CodingStyleguideUnaware Set <KEYTYPE> keySet(); @ReturnsImmutableObject @Nonnull Collection <VALUETYPE> values(); @Nonnull @ReturnsMutableCopy @CodingStyleguideUnaware Set <Map.Entry <KEYTYPE, VALUETYPE>> entrySet(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEquals () { final Map <String, Integer> aMap = new SingleElementMap <> (); final Map <String, Integer> aMap2 = new SingleElementMap <> (); assertEquals (aMap, aMap); assertEquals (aMap, aMap2); assertEquals (aMap2, aMap); assertNotEquals (aMap, null); assertNotEquals (aMap, "other"); assertEquals (aMap.hashCode (), aMap.hashCode ()); assertEquals (aMap.hashCode (), aMap2.hashCode ()); aMap.put ("any", I2); assertNotEquals (aMap, aMap2); assertNotEquals (aMap2, aMap); assertEquals (aMap.hashCode (), aMap.hashCode ()); assertNotEquals (aMap.hashCode (), aMap2.hashCode ()); aMap2.put ("any", I2); assertEquals (aMap, aMap2); assertEquals (aMap2, aMap); assertEquals (aMap.hashCode (), aMap2.hashCode ()); }