FsShell extends Configured implements Tool { public static void main(String argv[]) throws Exception { FsShell shell = newShellInstance(); Configuration conf = new Configuration(); conf.setQuietMode(false); shell.setConf(conf); int res; try { res = ToolRunner.run(shell, argv); } finally { shell.close(); } System.exit(res); } FsShell();  FsShell(Configuration conf); Path getCurrentTrashDir(); Path getCurrentTrashDir(Path path); @Override int run(String argv[]); void close(); static void main(String argv[]);  }
@Test public void testConfWithInvalidFile() throws Throwable { String[] args = new String[1]; args[0] = "--conf=invalidFile"; Throwable th = null; try { FsShell.main(args); } catch (Exception e) { th = e; } if (!(th instanceof RuntimeException)) { throw new AssertionError("Expected Runtime exception, got: " + th) .initCause(th); } }
@Test public void testConfWithInvalidFile() throws Throwable { String[] args = new String[1]; args[0] = "--conf=invalidFile"; Throwable th = null; try { FsShell.main(args); } catch (Exception e) { th = e; } if (!(th instanceof RuntimeException)) { throw new AssertionFailedError("Expected Runtime exception, got: " + th) .initCause(th); } }