### Question:
JobExecutionsMojo extends JobExecutionMojoBase { @Override public void execute() throws MojoExecutionException, MojoFailureException { final List<JobExecution> executions = getOrCreateOperator().getJobExecutions(new JobInstanceImpl(jobName, instanceId)); getLog().info("Job executions for job instance #" + instanceId + " (" + jobName + "):"); for (final JobExecution exec : executions) { getLog().info(" - " + toStr(exec)); } }  @Override void execute();  }### Answer:
@Test public void executions() throws Exception { final JobExecutionsMojo mojo = mojo(JobExecutionsMojo.class); final long id = mojo.getOrCreateOperator().start("simple", null); waitForEnd(mojo.getOrCreateOperator(), id); mojo.instanceId = mojo.getOrCreateOperator().getJobInstance(id).getInstanceId(); mojo.jobName = "simple"; mojo.execute(); final String output = BatchEEMojoTestFactory.output(mojo).toLowerCase(Locale.ENGLISH); assertTrue(output.contains("job executions for job instance #0 (simple):")); assertTrue(output.contains("id = #0, batch status = completed")); }