assertTrue(delegate.isExecuted());
}
@Test
public void testRightSignatureNamedMethod() {
AbstractTestComponent delegate = new AbstractTestComponent() {
@SuppressWarnings("unused")
public void aMethod(List<String> items) {
executed = true;
assertEquals("foo", items.get(0));
assertEquals("bar", items.get(1));
}
};
factoryBean.setDelegate(delegate);
Map<String, String> metaDataMap = new HashMap<String, String>();
metaDataMap.put(AFTER_WRITE.getPropertyName(), "aMethod");
factoryBean.setMetaDataMap(metaDataMap);
@SuppressWarnings("unchecked")
ItemWriteListener<String> listener = (ItemWriteListener<String>) factoryBean.getObject();
listener.afterWrite(Arrays.asList("foo", "bar"));
assertTrue(delegate.isExecuted());
}