assertTrue(delegate.isExecuted());
}
@Test
public void testRightSignatureNamedMethod() {
AbstractTestComponent delegate = new AbstractTestComponent() {
@SuppressWarnings("unused")
public void aMethod(JobExecution jobExecution) {
executed = true;
assertEquals(new Long(25), jobExecution.getId());
}
};
factoryBean.setDelegate(delegate);
Map<String, String> metaDataMap = new HashMap<String, String>();
metaDataMap.put(AFTER_JOB.getPropertyName(), "aMethod");
factoryBean.setMetaDataMap(metaDataMap);
JobExecutionListener listener = (JobExecutionListener) factoryBean.getObject();
listener.afterJob(new JobExecution(25L));
assertTrue(delegate.isExecuted());
}