@Test
    public void removeRetainsKey() {
        assumeThat(map, is(instanceOf(NonBlockingHashMap.class)));
        assumeThat(key, is(TEST_KEY_0));

        Long key1 = Long.valueOf(42424242);
        Long key2 = Long.valueOf(42424242);
        assertEquals(key1, key2);
        assertFalse(key1 == key2);
        // key1 and key2 are different instances with same hash/equals
        map.put(key1, "a");
        map.remove(key1);
        if (map instanceof NonBlockingHashMap) {
            assertTrue(contains(((NonBlockingHashMap) map).raw_array(), key1));
        }
        map.put(key2, "a");
        if (map instanceof NonBlockingHashMap) {
            assertFalse(contains(((NonBlockingHashMap) map).raw_array(), key2));
        }
        // key1 remains in the map
        Set<Long> keySet = map.keySet();
        assertEquals(keySet.size(), 1);
        if (map instanceof NonBlockingHashMap) {
            assertTrue(keySet.toArray()[0] == key1);
        }
    }
This test demonstrates a retention issue in the NBHM implementation which keeps old keys around until a resize
event.
See https://github.com/JCTools/JCTools/issues/354
jctools-core/src/test/java/org/jctools/maps/NBHMRemoveTest.java