String fileName = "dummyFileName";
dir = DirectoryBuilder.newDirectoryInstance(cache, cache, cache, "indexName").create();
createFile(fileName, dir);
assert dir.fileExists(fileName);
assert dir.fileModified(fileName) != 0;
assert dir.fileModified("nonExistentFileName.txt") == 0;
} finally {
if (dir != null) dir.close();
}