Processor applicationProcessor = mock(Processor.class);
when(connectionProcessor.supports(any(Message.class))).thenReturn(true);
when(applicationProcessor.supports(any(Message.class))).thenReturn(true);
ConnectorService connectionService = routingEngine.addConnection("1", connectionProcessor);
ConnectorService applicationService = routingEngine.addApplication("1", applicationProcessor);
Acceptor acceptor = new Acceptor() {
@Override
public boolean accepts(Message message) {
return true;
}
};
connectionService.addAcceptor(acceptor);
connectionService.start();
applicationService.addAcceptor(acceptor);
applicationService.start();
// retry failed messages
routingEngine.retryFailedMessages();
// verify