@Override
  public void addSinglePath(AlluxioURI path) {
    MountInfo mountInfo = getMountInfo(path);
    if (mountInfo == null) {
      return;
    }
    addCacheEntry(path.getPath(), mountInfo);
  }
@Test
  public void metricCacheSize() throws Exception {
    MetricsSystem.resetCountersAndGauges();
    AsyncUfsAbsentPathCache cache = new TestAsyncUfsAbsentPathCache(mMountTable, THREADS, 1);

    // this metric is cached, sleep some time before reading it
    Callable<Long> cacheSize = () -> {
      Thread.sleep(2);
      return (long) MetricsSystem.METRIC_REGISTRY.getGauges()
          .get(MetricKey.MASTER_ABSENT_CACHE_SIZE.getName()).getValue();
    };

    cache.addSinglePath(new AlluxioURI("/mnt/1"));
    assertEquals(1, (long) cacheSize.call());
    cache.addSinglePath(new AlluxioURI("/mnt/2"));
    assertEquals(2, (long) cacheSize.call());
    cache.addSinglePath(new AlluxioURI("/mnt/3"));
    assertEquals(3, (long) cacheSize.call());
    cache.addSinglePath(new AlluxioURI("/mnt/4"));
    assertEquals(3, (long) cacheSize.call());
  }