public LRUCache(int capacity) {
    this(capacity, -1);
  }
@Test
  public void testLRUCache() throws InterruptedException {
    LRUCache<String, Integer> lruCache = new LRUCache<>(3, CACHE_EXPIRE_TIME);
    lruCache.put("1", 1);
    lruCache.put("2", 1);
    lruCache.put("3", 3);
    lruCache.put("4", 4);
    Assert.assertEquals(lruCache.size(), 3);
    Assert.assertNull(lruCache.get("1"));
    Assert.assertNotNull(lruCache.get("2"));
    Assert.assertNotNull(lruCache.get("3"));
    Assert.assertNotNull(lruCache.get("3"));
    lruCache.clear();

    lruCache.put("1", 1);
    Thread.sleep(201);
    Assert.assertEquals(lruCache.size(), 1);
    lruCache.get("1");
    Assert.assertEquals(lruCache.size(), 0);
    lruCache.put("2", 2);
    Assert.assertEquals(lruCache.size(), 1);
    lruCache.put("3", 3);
    Assert.assertEquals(lruCache.size(), 2);
  }