@Test
public void testKeySet() {

	Set<Key> keySet = _concurrentMap.keySet();
	Assert.assertSame(keySet, _concurrentMap.keySet());
	Assert.assertTrue(keySet.toString(), keySet.isEmpty());
	Assert.assertFalse(keySet.toString(), keySet.contains(_testKey));
	_assertEventQueue(Event.MAP_KEY_FOR_QUERY);
	Assert.assertFalse(keySet.remove(_testKey));
	_assertEventQueue(Event.MAP_KEY_FOR_QUERY);
	Assert.assertNull(_concurrentMap.put(_testKey, _testValue1));
	_assertEventQueue(Event.MAP_KEY, Event.MAP_VALUE);
	String keySetString = keySet.toString();
	_assertEventQueue(Event.UNMAP_KEY_FOR_QUERY);
	Assert.assertEquals(keySetString, 1, keySet.size());
	Assert.assertTrue(keySetString, keySet.contains(_testKey));
	_assertEventQueue(Event.MAP_KEY_FOR_QUERY);
	Assert.assertTrue(keySet.remove(_testKey));
	_assertEventQueue(Event.MAP_KEY_FOR_QUERY, Event.UNMAP_VALUE);
	Assert.assertNull(_concurrentMap.put(_testKey, _testValue1));
	_assertEventQueue(Event.MAP_KEY, Event.MAP_VALUE);
	keySetString = keySet.toString();
	_assertEventQueue(Event.UNMAP_KEY_FOR_QUERY);
	Assert.assertEquals(keySetString, 1, keySet.size());
	Assert.assertEquals(Collections.singleton(_testKey), keySet);
	_assertEventQueue(Event.UNMAP_KEY_FOR_QUERY);
	Iterator<Key> iterator = keySet.iterator();
	Assert.assertTrue(iterator.hasNext());
	Key key = iterator.next();
	_assertEventQueue(Event.UNMAP_KEY_FOR_QUERY);
	keySetString = keySet.toString();
	_assertEventQueue(Event.UNMAP_KEY_FOR_QUERY);
	Assert.assertEquals(_testKey, key);
	Assert.assertFalse(iterator.hasNext());
	Assert.assertTrue(keySetString, keySet.contains(key));
	_assertEventQueue(Event.MAP_KEY_FOR_QUERY);
	iterator.remove();
	Assert.assertTrue(keySet.toString(), keySet.isEmpty());
	Assert.assertFalse(keySet.toString(), keySet.contains(key));
	_assertEventQueue(Event.MAP_KEY_FOR_QUERY);
	Assert.assertNull(_concurrentMap.put(_testKey, _testValue1));
	_assertEventQueue(Event.MAP_KEY, Event.MAP_VALUE);
	Assert.assertEquals(keySet.toString(), 1, keySet.size());
	keySet.clear();
	Assert.assertTrue(_concurrentMap.isEmpty());
}