@Override @Test public void getIfAbsentPut() { final MutableMap<Integer, String> map = new SingletonMap<Integer, String>(1, "1"); Verify.assertThrows( UnsupportedOperationException.class, new Runnable() { public void run() { map.getIfAbsentPut(4, new Constant<String>("4")); } }); Assert.assertEquals("1", map.getIfAbsentPut(1, new Constant<String>("1"))); }