MockJobClient c1 = new MockJobClient("testing", COMPLETED);
JobClientProfile profile = new JobClientProfile("testing", list(c1), 1000, 10);
QueueHadoopScriptHandler handler = create();
handler.doConfigure(profile);
ExecutionContext context = context();
HadoopScript script = script();
handler.execute(ExecutionMonitor.NULL, context, script);
JobScript js = c1.registered.get("testing");
assertThat(js, is(notNullValue()));
assertThat(js.getBatchId(), is(context.getBatchId()));
assertThat(js.getFlowId(), is(context.getFlowId()));
assertThat(js.getExecutionId(), is(context.getExecutionId()));
assertThat(js.getPhase(), is(context.getPhase()));
assertThat(js.getStageId(), is(script.getId()));
assertThat(js.getMainClassName(), is(script.getClassName()));
assertThat(js.getArguments(), is(context.getArguments()));
assertThat(js.getProperties(), hasEntry("s", "service"));
assertThat(js.getEnvironmentVariables(), is(script.getEnvironmentVariables()));
}