}
public static <K> void expectUnorderedEvents(EventLogListener eventListener, ClientEvent.Type type, K... keys) {
List<K> assertedKeys = new ArrayList<K>();
for (int i = 0; i < keys.length; i++) {
ClientEvent event = eventListener.pollEvent(type);
int initialSize = assertedKeys.size();
for (K key : keys) {
K eventKey = null;
switch (event.getType()) {
case CLIENT_CACHE_ENTRY_CREATED:
eventKey = ((ClientCacheEntryCreatedEvent<K>) event).getKey();
break;
case CLIENT_CACHE_ENTRY_MODIFIED:
eventKey = ((ClientCacheEntryModifiedEvent<K>) event).getKey();