  @Test
  @Ignore
  public void testCollision() throws Exception {

    ExecutorService executorService = Executors.newFixedThreadPool(100);

    final int NUM_IDS = 1_000_000;
    final ConcurrentMap<Long, AtomicInteger> collisionMap = new ConcurrentHashMap<Long, AtomicInteger>(NUM_IDS);

    for (int i = 0; i < NUM_IDS; i++) {
      executorService.submit(new Runnable() {
        @Override
        public void run() {
          long id = IdentityGenerator.generate();

          AtomicInteger collisionCount = collisionMap.get(id);
          if (collisionCount == null) {
            collisionCount = new AtomicInteger(0);
            AtomicInteger oldCollisionCount = collisionMap.putIfAbsent(id, collisionCount);
            if (oldCollisionCount != null) {
              collisionCount.addAndGet(oldCollisionCount.get());
            }
          } else {
            int currentCollisionCount = collisionCount.incrementAndGet();
            LOGGER.warn("{} collision(s) on ID {}", currentCollisionCount, id);
          }

        }

      });
    }

    executorService.shutdown();
    executorService.awaitTermination(30, TimeUnit.SECONDS);

    double uniquePercent = collisionMap.size() * 100.0 / NUM_IDS;
    LOGGER.info("{}% of all IDs are unique.", uniquePercent);

    assertTrue(uniquePercent > 99.9);
  }