baos.write(b);
}
};
}
};
HistoricalNotificationDispatcher dispatcher =
new HistoricalNotificationDispatcher(request, response) {
@Override
public void onAllNotifications(
OrderSummary orderSummary, Notification notification)
throws Exception {
List<DispatcherHistoryElement> history = this.getHistory();
assertEquals(
new DispatcherHistoryElement(NotificationDispatcherTest.SERIAL_NUMBER,
"startTransaction", false, false),
history.get(0));
assertEquals(
new DispatcherHistoryElement(NotificationDispatcherTest.SERIAL_NUMBER,
"hasAlreadyHandled", false, false),
history.get(1));
assertEquals(2, history.size());
}
};
apiContext().handleNotification(dispatcher);
List<DispatcherHistoryElement> history = dispatcher.getHistory();
assertEquals(
new DispatcherHistoryElement(SERIAL_NUMBER,
"startTransaction", false, false),
history.get(0));
assertEquals(