@Test
public void shouldAllowRemovingAllValuesForKey() {

    LocalDuplicateIndex<Long> index = duplicateValueIndex(Long.class);
    loadLongIndexWithNoDuplicates(index, 10);
    assertThat(index.estimateTotalCount(), is(10L));
    // Check the values that are in the index ...
    assertThat(index.estimateTotalCount(), is(10L));
    assertMatch(index, Operator.EQUAL_TO, 20L, key(2));
    // Remove the value associated with a given key and verify they are indeed gone ...
    index.remove(key(2));
    assertNoMatch(index, Operator.EQUAL_TO, 20L);
    assertThat(index.estimateTotalCount(), is(9L));
    // Try to remove the values associated with a key not in the index ...
    assertNoMatch(index, Operator.EQUAL_TO, 200L);
    index.remove(key(20));
    assertNoMatch(index, Operator.EQUAL_TO, 200L);
    assertThat(index.estimateTotalCount(), is(9L));
    // Remove a value and key pair that's in the index, and verify they are indeed gone ...
    index.remove(key(3), null, 30L);
    assertNoMatch(index, Operator.EQUAL_TO, 30L);
    assertThat(index.estimateTotalCount(), is(8L));
    // Try to remove a non-existent value-key pair, and verify nothing is removed ...
    index.remove(key(3), null, 3000L);
    assertNoMatch(index, Operator.EQUAL_TO, 30L);
    assertThat(index.estimateTotalCount(), is(8L));
}