@Test
    void requireThatReplyCanBeRemovedFromChildNodes() {
        SimpleProtocol protocol = new SimpleProtocol();
        protocol.addPolicyFactory("Custom", param -> new RemoveReplyPolicy(true,
                                                                           List.of(ErrorCode.NO_ADDRESS_FOR_SERVICE),
                                                                   CustomPolicyFactory.parseRoutes(param),
                                                                   0));
        srcServer.mb.putProtocol(protocol);
        retryPolicy.setEnabled(false);
        assertTrue(srcSession.send(createMessage("msg"),
                Route.parse("[Custom:[Custom:" + dstSessName + "],[Custom:dst/unknown]]")).isAccepted());
        Message msg = ((Receptor) dstSession.getMessageHandler()).getMessage(60);
        assertNotNull(msg);
        dstSession.acknowledge(msg);
        Reply reply = ((Receptor) srcSession.getReplyHandler()).getReply(60);
        assertNotNull(reply);
        assertFalse(reply.hasErrors());
        assertTrace(List.of("[NO_ADDRESS_FOR_SERVICE @ localhost]",
                        "-[NO_ADDRESS_FOR_SERVICE @ localhost]",
                        "Sending message",
                        "-Sending message"),
                reply.getTrace());
    }
@author havardpe
@author Simon Thoresen Hult
messagebus/src/test/java/com/yahoo/messagebus/routing/RoutingTestCase.java