@Test(timeout = 5000l)
public void testInvalidApplicationId() throws Exception {

  Configuration conf = new YarnConfiguration();
  YarnClient mockYarnClient = createMockYarnClient(YarnApplicationState.FINISHED);
  LogsCLI cli = new LogsCLIForTest(mockYarnClient);
  cli.setConf(conf);
  
  int exitCode = cli.run( new String[] { "-applicationId", "not_an_app_id"});
  assertTrue(exitCode == -1);
  assertTrue(sysErrStream.toString().startsWith("Invalid ApplicationId specified"));
}