for (int i = 0; i < NUM_THREADS; i++) {
threads[i].join();
}
for (int eventId = 0; eventId < NUM_EVENTS; eventId++) {
Event event = eventStorage.getEvent(eventId);
Assert.assertEquals(shardedEventIndex.getEventTypeId(event.getEventType()), eventStorage.getEventTypeId(eventId));
Assert.assertEquals(userStorage.getId(event.getExternalUserId()), eventStorage.getUserId(eventId));
}
Set<String> externalUserIds = Sets.newHashSet();
for (int i = 0; i < EXTERNAL_USER_IDS.length; i++) {
externalUserIds.add(userStorage.getUser(i).getExternalId());