DefaultCacheGateway implements CacheGateway { @Override public List<DirEntry> findEntries(final RepositoryName repositoryName, final String searchString, final String startDir) throws CacheException { final DirEntryCache entryCache = cacheManager.getCache(repositoryName); assertCacheExists(entryCache, repositoryName); return entryCache.findEntries(searchString, startDir); }  @Autowired void setEntryCacheManager(final DirEntryCacheManager cacheManager); @Autowired void setLogEntryCacheManager(final LogMessageCacheManager logMessageCacheManager); @Override List<DirEntry> findEntries(final RepositoryName repositoryName, final String searchString,
                                    final String startDir); @Override List<DirEntry> findEntriesByCamelCase(final RepositoryName repositoryName, final CamelCasePattern pattern,
                                               final String startDir); @Override List<DirEntry> findDirectories(final RepositoryName repositoryName, final String fromPath); @Override List<LogMessageSearchItem> find(final RepositoryName repositoryName, final String queryString); @Override List<LogMessageSearchItem> find(final RepositoryName repositoryName, final String queryString, final String startDir);  }
@Test public void testFindEntryInPath() throws Exception { final CacheGateway cache = createCache(); assertEquals(1, cache.findEntries(repositoryName, "html", "/trunk/src/").size()); assertEquals(5, cache.findEntries(repositoryName, "java", "/").size()); assertEquals(1, cache.findEntries(repositoryName, "code", "/").size()); }