}
}
public void testContainsKeyWithNoExistentRootDir() {
final File rootDir = new File(new File(parentDir).getAbsoluteFile(), getIndexPathName() + "___");
final EmbeddedCacheManager cacheManager = initializeInfinispan(rootDir);
try {
TestingUtil.withCacheManager(new CacheManagerCallable(cacheManager) {
@Override
public void call() {
Cache cache = cacheManager.getCache();
Directory directory = DirectoryBuilder.newDirectoryInstance(cache, cache, cache, indexName).create();
try {
TestHelper.createIndex(rootDir, indexName, elementCount, true);
TestHelper.verifyOnDirectory(directory, elementCount, true);
String[] fileNamesFromIndexDir = TestHelper.getFileNamesFromDir(rootDir, indexName);
LuceneCacheLoader cacheLoader = (LuceneCacheLoader) TestingUtil.getFirstLoader(cacheManager.getCache());
for(String fileName : fileNamesFromIndexDir) {
FileCacheKey key = new FileCacheKey(indexName, fileName);
assert cacheLoader.contains(key);
//Testing non-existent keys with non-acceptable type