public void createJobParametersUsingFileWithUniqueParam() throws Exception {
final File file = temporaryFolder.newFile("MyPayloadFile.txt");
final Message<File> message = MessageBuilder.withPayload(file).build();
final JobLaunchRequest jobLaunchRequest = transformer.toJobLaunchRequest(message);
final JobParameters jobParameters = jobLaunchRequest.getJobParameters();
assertNotNull(jobParameters);
assertTrue(jobParameters.getParameters().size() == 2);
assertTrue(
String.format("Property '%s' did not end with '%s'.",
ExpandedJobParametersConverter.ABSOLUTE_FILE_PATH, "MyPayloadFile.txt"),
jobParameters.getString(ExpandedJobParametersConverter.ABSOLUTE_FILE_PATH).endsWith(
"MyPayloadFile.txt"));
assertNotNull(jobLaunchRequest.getJobParameters().getString("random"));
}