### Question:
FlagMaker implements Runnable, Observer, SizeValidator { FileSystem getHadoopFS() throws IOException { Configuration hadoopConfiguration = new Configuration(); hadoopConfiguration.set("fs.defaultFS", fmc.getHdfs()); try { return FileSystem.get(hadoopConfiguration); } catch (IOException ex) { log.error("Unable to connect to HDFS. Exiting"); throw ex; } } FlagMaker(FlagMakerConfig fmconfig); static void main(String... args); @Override void run(); @Override void update(Observable o, Object arg); @Override boolean isValidSize(FlagDataTypeConfig fc, Collection<InputFile> files); static final Pattern pattern; }### Answer:
@Test public void testGetHadoopFS() throws Exception { log.info("----- testGetHadoopFS -----"); File fdir = new File(FLAG_DIR); if (fdir.exists()) fdir.delete(); FlagMaker instance = new TestWrappedFlagMaker(fmc); FileSystem result = instance.getHadoopFS(); result.mkdirs(new Path(FLAG_DIR)); assertTrue(fdir.exists() && fdir.isDirectory()); }