super.doSetUp();
startServer();
getFilesLatch = new CountDownLatch(1);
putFilesLatch = new CountDownLatch(1);
muleContext.registerListener(new EndpointMessageNotificationListener() {
public void onNotification(final ServerNotification notification) {
if ("retrieveSalesStatistics".equals(notification.getResourceIdentifier())
&& "end dispatch".equals(notification.getActionName())) {
getFilesLatch.countDown();
}
}
});
muleContext.registerListener(new EndpointMessageNotificationListener() {
public void onNotification(final ServerNotification notification) {
if ("ftpProductCatalog".equals(notification.getResourceIdentifier())
&& "end dispatch".equals(notification.getActionName())) {
putFilesLatch.countDown();
}