public void cache() {
        for(Map.Entry<Path, AttributedList<Path>> entry : contents.entrySet()) {
            final AttributedList<Path> list = entry.getValue();
            if(!(AttributedList.<Path>emptyList() == list)) {
                if(log.isDebugEnabled()) {
                    log.debug(String.format("Cache directory listing for %s", entry.getKey()));
                }
                cache.put(entry.getKey(), list);
            }
        }
    }
@Test
    public void testNoChunk() {
        final PathCache cache = new PathCache(1);
        final Path directory = new Path("/", EnumSet.of(Path.Type.directory));
        final CachingListProgressListener listener = new CachingListProgressListener(cache);
        listener.cache();
        assertFalse(cache.isCached(directory));
    }