@Test
    void requireThatHopResolutionOverflowIsCaught() {
        srcServer.setupRouting(new RoutingTableSpec(SimpleProtocol.NAME)
                .addHop(new HopSpec("foo", "bar"))
                .addHop(new HopSpec("bar", "foo")));
        assertTrue(srcSession.send(createMessage("msg"), Route.parse("foo")).isAccepted());
        Reply reply = ((Receptor) srcSession.getReplyHandler()).getReply(60);
        assertNotNull(reply);
        assertEquals(1, reply.getNumErrors());
        assertEquals(ErrorCode.ILLEGAL_ROUTE, reply.getError(0).getCode());
    }
@author havardpe
@author Simon Thoresen Hult
messagebus/src/test/java/com/yahoo/messagebus/routing/RoutingTestCase.java