@Test
    void requireThatTransientErrorsAreRetried() {
        assertTrue(srcSession.send(createMessage("msg"), Route.parse(dstSessName)).isAccepted());
        Message msg = ((Receptor) dstSession.getMessageHandler()).getMessage(60);
        assertNotNull(msg);
        Reply reply = new EmptyReply();
        reply.swapState(msg);
        reply.addError(new Error(ErrorCode.APP_TRANSIENT_ERROR, "err1"));
        dstSession.reply(reply);
        assertNotNull(msg = ((Receptor) dstSession.getMessageHandler()).getMessage(60));
        reply = new EmptyReply();
        reply.swapState(msg);
        reply.addError(new Error(ErrorCode.APP_TRANSIENT_ERROR, "err2"));
        dstSession.reply(reply);
        assertNotNull(msg = ((Receptor) dstSession.getMessageHandler()).getMessage(60));
        dstSession.acknowledge(msg);
        assertNotNull(reply = ((Receptor) srcSession.getReplyHandler()).getReply(60));
        assertFalse(reply.hasErrors());
        assertTrace(List.of("[APP_TRANSIENT_ERROR @ localhost]: err1",
                        "-[APP_TRANSIENT_ERROR @ localhost]: err1",
                        "[APP_TRANSIENT_ERROR @ localhost]: err2",
                        "-[APP_TRANSIENT_ERROR @ localhost]: err2"),
                reply.getTrace());
    }
@author havardpe
@author Simon Thoresen Hult
messagebus/src/test/java/com/yahoo/messagebus/routing/RoutingTestCase.java