/**
* Verified the file exists and has a specified value for readLock;
* Consider that null should be interpreted as value 1;
*/
public static void assertFileExistsHavingRLCount(Cache cache, String fileName, String indexName, int expectedReadcount, int chunkSize, boolean expectRegisteredInFat) {
Set<String> fileList = (Set<String>) cache.get(new FileListCacheKey(indexName));
Assert.assertNotNull(fileList);
Assert.assertTrue(fileList.contains(fileName) == expectRegisteredInFat);
FileMetadata metadata = (FileMetadata) cache.get(new FileCacheKey(indexName, fileName));
Assert.assertNotNull(metadata);
long totalFileSize = metadata.getSize();