### Question:
JobParameterExecutionDecider implements JobExecutionDecider { @Override public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) { return new FlowExecutionStatus(jobExecution.getJobParameters().getString(jobParameterKey)); }  @Override FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution); @Required void setJobParameterKey(String jobParameterKey);  }### Answer:
@Test public void shouldReturnFlowStatusFromJobParameter() { JobParameters jobParameters = new JobParametersBuilder() .addString(JOB_PARAMETER_KEY, "PUFF") .toJobParameters(); JobExecution jobExecution = new JobExecution(1L, jobParameters); StepExecution stepExecution = new StepExecution("myStep", jobExecution); final FlowExecutionStatus flowExecutionStatus = decider.decide(jobExecution, stepExecution); assertThat(flowExecutionStatus, is(not(nullValue()))); assertThat(flowExecutionStatus, is(new FlowExecutionStatus("PUFF"))); }