protected static Path mockWithFileSystem(int blockCount, long blockSize, long extraBlockSize) throws Exception {
final ArrayList<BlockLocation> blocks = new ArrayList<BlockLocation>();
long offset = 0;
int i = 0;
for (; i < blockCount; i++) {
blocks.add(new BlockLocation(new String[]{"names"+i}, new String[]{"hosts"+i}, offset, blockSize));
offset += blockSize;
}
// extra just means that we add a non full last block
if (extraBlockSize > 0 && extraBlockSize < blockSize) {
blocks.add(new BlockLocation(new String[]{"names"+i}, new String[]{"hosts"+i}, offset, extraBlockSize));
offset += extraBlockSize;
}
FileStatus mStatus = mock(FileStatus.class);
Path mPath = mock(Path.class);