SingleAgentRouter implements Router { @Override public Agent[] route(Request request) { return new Agent[]{agent}; } SingleAgentRouter(Agent agent); @Override Agent[] route(Request request); @Override Agent[] getAgents();  }
@Test public void testRoute() { Agent agent = mock(Agent.class); Router router = new SingleAgentRouter(agent); Agent agents[] = router.route(new Request("hello world")); Agent expected[] = new Agent[]{agent}; assertArrayEquals(expected, agents); }