@Test
public void testListEvents() throws Exception {

  Cluster mockCluster = mock(Cluster.class);
  CLI cli = spy(new CLI(new Configuration()));
  doReturn(mockCluster).when(cli).createCluster();
  String jobId1 = "job_1234654654_001";
  String jobId2 = "job_1234654656_002";
  Job mockJob1 = mockJob(mockCluster, jobId1, State.RUNNING);
  // Check exiting with non existing job
  int exitCode = cli.run(new String[]{"-events", jobId2, "0", "10"});
  assertEquals(-1, exitCode);
}