@Test
public void testRemove() {

    FastSafeIterableMap<Integer, Integer> map = new FastSafeIterableMap<>();
    map.putIfAbsent(10, 20);
    map.putIfAbsent(20, 40);
    assertThat(map.contains(10), is(true));
    assertThat(map.contains(20), is(true));
    assertThat(map.remove(10), is(20));
    assertThat(map.contains(10), is(false));
    assertThat(map.putIfAbsent(10, 30), nullValue());
    assertThat(map.putIfAbsent(10, 40), is(30));
}