private void testJobParameters(Object target) throws Exception {
TestContext testContext = getTestContext(target);
listener.prepareTestInstance(testContext);
try {
listener.beforeTestMethod(testContext);
JobContext context = JobSynchronizationManager.getContext();
assertNotNull(context);
assertEquals("spam", context.getJobParameters().get("foo"));
}
finally {
listener.afterTestMethod(testContext);
}
assertNull(JobSynchronizationManager.getContext());