@Test
public void testComputeIfAbsent() {

	try {
		_concurrentMap.computeIfAbsent(null, null);
		Assert.fail("Should throw NullPointerException");
	}
	catch (NullPointerException nullPointerException) {
		Assert.assertEquals(
			"Key is null", nullPointerException.getMessage());
	}
	try {
		_concurrentMap.computeIfAbsent(_testKey, null);
		Assert.fail("Should throw NullPointerException");
	}
	catch (NullPointerException nullPointerException) {
		Assert.assertEquals(
			"Mapping function is null", nullPointerException.getMessage());
	}
	Assert.assertNull(
		_concurrentMap.computeIfAbsent(_testKey, key -> null));
	_assertEventQueue(Event.MAP_KEY, Event.UNMAP_KEY);
	Assert.assertSame(
		_testValue1,
		_concurrentMap.computeIfAbsent(_testKey, key -> _testValue1));
	_assertEventQueue(Event.MAP_KEY, Event.MAP_VALUE);
	Assert.assertSame(
		_testValue1,
		_concurrentMap.computeIfAbsent(_testKey, key -> _testValue2));
	_assertEventQueue(
		Event.MAP_KEY, Event.UNMAP_KEY, Event.UNMAP_VALUE_FOR_QUERY);
	Assert.assertSame(_testValue1, _concurrentMap.get(_testKey));
	_assertEventQueue(Event.MAP_KEY_FOR_QUERY, Event.UNMAP_VALUE_FOR_QUERY);
	ConcurrentMap<KeyReference, ValueReference> innerConcurrentMap =
		ReflectionTestUtil.getFieldValue(
			_concurrentMap, "innerConcurrentMap");
	Assert.assertEquals(
		innerConcurrentMap.toString(), 1, innerConcurrentMap.size());
	Collection<ValueReference> valueReferences =
		innerConcurrentMap.values();
	Iterator<ValueReference> iterator = valueReferences.iterator();
	ValueReference valueReference = iterator.next();
	ReflectionTestUtil.setFieldValue(valueReference, "_value", null);
	Assert.assertSame(
		_testValue2,
		_concurrentMap.computeIfAbsent(_testKey, key -> _testValue2));
	_assertEventQueue(
		Event.MAP_KEY, Event.UNMAP_KEY, Event.UNMAP_VALUE_FOR_QUERY,
		Event.MAP_KEY, Event.MAP_VALUE);
}