UploadStagingCache implements Closeable { protected Iterator<String> getAllIdentifiers() { return map.keySet().iterator(); } private  UploadStagingCache(File dir, File home, int uploadThreads, long size /* bytes */,
        StagingUploader uploader, @Nullable FileCache cache, StatisticsProvider statisticsProvider,
        @Nullable ListeningExecutorService executor,
        @Nullable ScheduledExecutorService scheduledExecutor,
        int purgeInterval /* secs */, int retryInterval /* secs */); private  UploadStagingCache(); static UploadStagingCache build(File dir, File home, int uploadThreads, long size
        /* bytes */, StagingUploader uploader, @Nullable FileCache cache,
        StatisticsProvider statisticsProvider, @Nullable ListeningExecutorService executor,
        @Nullable ScheduledExecutorService scheduledExecutor, int purgeInterval /* secs */,
        int retryInterval /* secs */); Optional<SettableFuture<Integer>> put(String id, File input); @Nullable File getIfPresent(String key); DataStoreCacheStatsMBean getStats(); @Override void close();  }
@Test public void testGetAllIdentifiersNoAdd() throws Exception { Iterator<String> ids = stagingCache.getAllIdentifiers(); assertFalse(ids.hasNext()); }
@Test public void testGetAllIdentifiers() throws Exception { List<ListenableFuture<Integer>> futures = put(folder); Iterator<String> idsIter = stagingCache.getAllIdentifiers(); assertEquals(ID_PREFIX + 0, Iterators.getOnlyElement(idsIter)); taskLatch.countDown(); callbackLatch.countDown(); assertFuture(futures, 0); assertCacheStats(stagingCache, 0, 0, 1, 1); idsIter = stagingCache.getAllIdentifiers(); assertEquals(0, Iterators.size(idsIter)); }