@Test
public void testPutIfAbsent() {

  Map<String, Integer> map = Maps.newHashMap();
  BenchmarkUtils.putIfAbsent(map, "key1", 1);
  assertThat(map.get("key1")).isEqualTo(1);
  BenchmarkUtils.putIfAbsent(map, "key1", 2);
  assertThat(map.get("key1")).isEqualTo(1);
  BenchmarkUtils.putIfAbsent(map, "key2", 3);
  assertThat(map.get("key2")).isEqualTo(3);
}