public class AbstractProcessingRouteChainTest {
@Test
public void testRouteChaining() throws Exception {
ProcessingRouteChain route1=new AbstractProcessingRouteChain() {
@Override
public Future<DistributedExecutionResult> route(Message message) {
return null;
}
};
ProcessingRouteChain route2=new AbstractProcessingRouteChain() {
@Override
public Future<DistributedExecutionResult> route(Message message) {
return new FutureTask<DistributedExecutionResult>(new Callable<DistributedExecutionResult>() {
@Override
public DistributedExecutionResult call() throws Exception {
return new DistributedExecutionResult("2");
}
});
}
};
ProcessingRouteChain route3=new AbstractProcessingRouteChain() {
@Override
public Future<DistributedExecutionResult> route(Message message) {
return null;
}