public void testErrors() throws Exception {
TestMediator t1 = new TestMediator();
t1.setHandler(
new TestMediateHandler() {
public void handle(MessageContext synCtx) {
result.append("T1.");
}
});
TestMediator t2 = new TestMediator();
t2.setHandler(
new TestMediateHandler() {
public void handle(MessageContext synCtx) {
result.append("T2.");
throw new SynapseException("test");
}
});
TestMediator t3 = new TestMediator();
t3.setHandler(
new TestMediateHandler() {
public void handle(MessageContext synCtx) {
result.append("T3.");
}
});
TestMediator te = new TestMediator();
te.setHandler(
new TestMediateHandler() {
public void handle(MessageContext synCtx) {
result.append("TE.");
}
});
TestMediator tf = new TestMediator();
tf.setHandler(
new TestMediateHandler() {
public void handle(MessageContext synCtx) {
result.append("TF");
}
});