### Question:
TokenCacheNodeManager { public static void putTokenCacheNode(long tokenId, TokenCacheNode cacheNode) { TOKEN_CACHE_NODE_MAP.put(tokenId, cacheNode); }  static void prepare(int concurrencyLevel, int maximumWeightedCapacity); static TokenCacheNode getTokenCacheNode(long tokenId); static void putTokenCacheNode(long tokenId, TokenCacheNode cacheNode); static boolean isContainsTokenId(long tokenId); static TokenCacheNode removeTokenCacheNode(long tokenId); static int getSize(); static Set<Long> getCacheKeySet(); static boolean validToken(TokenCacheNode cacheNode);  }### Answer:
@Test public void testPutTokenCacheNode() throws InterruptedException { setCurrentMillis(System.currentTimeMillis()); for (long i = 0; i < 100; i++) { final TokenCacheNode node = new TokenCacheNode(); node.setTokenId(i); node.setFlowId(111L); node.setResourceTimeout(10000L); node.setClientTimeout(10000L); node.setClientAddress("localhost"); if (TokenCacheNodeManager.validToken(node)) { TokenCacheNodeManager.putTokenCacheNode(node.getTokenId(), node); } } Assert.assertEquals(100, TokenCacheNodeManager.getSize()); for (int i = 0; i < 100; i++) { TokenCacheNodeManager.getTokenCacheNode((long) (Math.random() * 100)); } List<Long> keyList = new ArrayList<>(TokenCacheNodeManager.getCacheKeySet()); for (int i = 0; i < 100; i++) { Assert.assertEquals(i, (long) keyList.get(i)); TokenCacheNodeManager.removeTokenCacheNode(i); } }