void () { Map<Object, Object> map = factory.create(); String val = "val"; Assume.assumeTrue("Does not support null keys", isSupported(() -> map.put(null, val))); Assert.assertEquals(1, map.size()); Assert.assertTrue("Null key not found", map.containsKey(null)); Assert.assertEquals(1, map.size()); Assert.assertEquals("Val differs", val, map.get(null)); Assert.assertEquals(1, map.size()); Assert.assertEquals("Removed val differs", val, map.remove(null)); Assert.assertEquals(0, map.size()); map.put(null, val); Assert.assertTrue("Removed val differs", map.remove(null, val)); Assert.assertEquals(0, map.size()); }