@Test
    public void testPutIfAbsent() {
        SafeConcurrentHashMap<Object, Object> map = new SafeConcurrentHashMap<>();
        Assert.assertNull(map.putIfAbsent(null, null));
        Assert.assertNull(map.putIfAbsent(null, "value"));
        Assert.assertNull(map.putIfAbsent("key", null));
        Assert.assertEquals(0, map.size());
        Assert.assertNull(map.putIfAbsent("key", "value"));
        Assert.assertEquals(1, map.size());
        Assert.assertEquals("value", map.get("key"));
        Assert.assertEquals("value", map.putIfAbsent("key", "anotherValue"));
    }
@author <a href=mailto:orezsilence@163.com>zhangchengxi</a>
core/api/src/test/java/com/alipay/sofa/rpc/core/util/SafeConcurrentHashMapTest.java