StepExecution stepExecution = new StepExecution("foo", null);
ExecutionContext stepExecutionContext = new ExecutionContext();
stepExecutionContext.putString("filePath", "foo.txt");
stepExecution.setExecutionContext(stepExecutionContext);
StepContext stepContext = new StepContext(stepExecution);
ChunkContext chunkContext = new ChunkContext(stepContext);
RemoteFileTemplate template = new RemoteFileTemplate(factory);
template.setBeanFactory(mock(BeanFactory.class));
template.afterPropertiesSet();