### Question:
SingleElementMap implements ICommonsMap <KEYTYPE, VALUETYPE> { @Nullable public VALUETYPE remove (@Nullable final Object aKey) { if (!containsKey (aKey)) return null; final VALUETYPE aOldElement = m_aValue; m_bHasElement = false; m_aValue = null; m_aKey = null; return aOldElement; } 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 testRemove () { final Map <String, Integer> aMap = new SingleElementMap <> ("any", I5); assertNull (aMap.remove ("dummy")); assertEquals (I5, aMap.remove ("any")); assertEquals (0, aMap.size ()); assertTrue (aMap.isEmpty ()); assertFalse (aMap.containsKey ("any")); assertEquals (null, aMap.remove ("any")); assertEquals (null, aMap.remove (null)); }