IdentityMultimap { synchronized boolean removeKey(@NonNull final K key) { boolean removed = false; for (int index = 0; index < keysValues.length; index += 2) { if (keysValues[index] == key) { keysValues[index] = null; keysValues[index + 1] = null; removed = true; } } return removed; }    }
@Test public void shouldReturnThatNotAddedKeyWasNotRemoved() { assertThat(identityMultimap.removeKey(new Object()), is(false)); }