### Question:
AutoIncrIDAllocator implements IDAllocator { public List<UnsignedLongValue> alloc(int dbId, int tableId, int size) { if (LOGGER.isInfoEnabled()) { LOGGER.info("alloc id: dbId {}, tableId{}, size{}.", dbId, tableId, size); } return getTableIDAllocator(dbId, tableId).alloc(size); } AutoIncrIDAllocator(MetaStore metaStore, int rowIdStepSize); List<UnsignedLongValue> alloc(int dbId, int tableId, int size); void removeIDAlloctor(int dbId, int tableId);  }### Answer:
@Test public void testAllocByLocal() throws Exception { ConcurrentHashMap<Long, Long> map = new ConcurrentHashMap(); CountDownLatch latch = new CountDownLatch(num); for (int i = 0; i < num; i++) { executor.execute(() -> { try { UnsignedLongValue value = (UnsignedLongValue) alloc(); if (map.get(value.getValue().longValue()) != null) { System.out.println("duplate:" + value.getString()); } else { Long v = value.getValue().longValue(); map.put(v, v); } } catch (RuntimeException e) { e.printStackTrace(); System.out.println("executor err " + e.getMessage()); return; } finally { latch.countDown(); } }); } try { latch.await(); } catch (InterruptedException e) { e.printStackTrace(); } executor.shutdown(); }