@Test(timeout = 10000l)
public void testInvalidOpts() throws Exception {

  YarnClient mockYarnClient = createMockYarnClient(
      YarnApplicationState.FINISHED,
      UserGroupInformation.getCurrentUser().getShortUserName());
  LogsCLI cli = new LogsCLIForTest(mockYarnClient);
  cli.setConf(conf);
  int exitCode = cli.run( new String[] { "-InvalidOpts"});
  assertTrue(exitCode == -1);
  assertTrue(sysErrStream.toString().contains(
      "options parsing failed: Unrecognized option: -InvalidOpts"));
}