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

  YarnClient mockYarnClient = createMockYarnClientUnknownApp();
  LogsCLI cli = new LogsCLIForTest(mockYarnClient);
  cli.setConf(conf);
  int exitCode = cli.run(new String[] { "-applicationId",
      ApplicationId.newInstance(1, 1).toString() });
  // Error since no logs present for the app.
  assertTrue(exitCode != 0);
  assertTrue(sysErrStream.toString().startsWith(
      "Unable to get ApplicationState"));
}