@Test public void testDontUseParentParameters() throws Exception { DefaultJobParametersExtractor extractor = new DefaultJobParametersExtractor(); extractor.setUseAllParentParameters(false); JobExecution jobExecution = new JobExecution(0L, new JobParametersBuilder() .addString("parentParam", "val") .toJobParameters()); StepExecution stepExecution = new StepExecution("step", jobExecution); stepExecution.getExecutionContext().putDouble("foo", 11.1); extractor.setKeys(new String[] {"foo(double)"}); JobParameters jobParameters = extractor.getJobParameters(null, stepExecution); assertEquals("{foo=11.1}", jobParameters.toString()); } }