@Test
    void requireThatRouteExpansionOnlyReplacesFirstHop() {
        srcServer.setupRouting(new RoutingTableSpec(SimpleProtocol.NAME)
                .addRoute(new RouteSpec("foo").addHop(dstSessName).addHop("bar")));
        assertTrue(srcSession.send(createMessage("msg"), Route.parse("route:foo baz")).isAccepted());
        Message msg = ((Receptor) dstSession.getMessageHandler()).getMessage(60);
        assertNotNull(msg);
        assertEquals(2, msg.getRoute().getNumHops());
        assertEquals("bar", msg.getRoute().getHop(0).toString());
        assertEquals("baz", msg.getRoute().getHop(1).toString());
        dstSession.acknowledge(msg);
        Reply reply = ((Receptor) srcSession.getReplyHandler()).getReply(60);
        assertNotNull(reply);
        assertFalse(reply.hasErrors());
    }
@author havardpe
@author Simon Thoresen Hult
messagebus/src/test/java/com/yahoo/messagebus/routing/RoutingTestCase.java