### Question:
TableSplitsCache extends BaseHdfsFileCacheUtil { public FileStatus getFileStatus() { FileStatus splitsStatus = null; try { splitsStatus = FileSystem.get(this.splitsPath.toUri(), conf).getFileStatus(this.splitsPath); } catch (IOException ex) { String logMessage = ex instanceof FileNotFoundException ? "No splits file present" : "Could not get the FileStatus of the splits file"; log.warn(logMessage); } return splitsStatus; } TableSplitsCache(Configuration conf); static List<Text> trimSplits(List<Text> tableSplits, int maxSplits); @Override void setCacheFilePath(Configuration conf); static Path getSplitsPath(Configuration conf); static boolean shouldRefreshSplits(Configuration conf); FileStatus getFileStatus(); @Override void writeCacheFile(FileSystem fs, Path tmpSplitsFile); List<Text> getSplits(String table); List<Text> getSplits(String table, int maxSplits); Map<String,List<Text>> getSplits(); static final String REFRESH_SPLITS; static final String SPLITS_CACHE_DIR; static final String MAX_SPLIT_DECREASE; static final String MAX_SPLIT_PERCENTAGE_DECREASE; }### Answer:
@Test public void testGetFileStatus() { logger.info("testGetFileStatus called..."); setSplitsCacheDir(); setupConfiguration(); try { TableSplitsCache uut = new TableSplitsCache(createMockJobConf()); FileStatus fileStatus = uut.getFileStatus(); Assert.assertNotNull("FileStatus", fileStatus); } finally { logger.info("testGetFileStatus completed."); } }