WebSocketRoutingPlanSender implements RoutingPlanConsumer { @Override public void consumePlan(RoutingPlan routingPlan) { webSocket.convertAndSend(TOPIC_ROUTE, PortableRoutingPlanFactory.fromRoutingPlan(routingPlan)); } @Autowired  WebSocketRoutingPlanSender(SimpMessagingTemplate webSocket); @Override void consumePlan(RoutingPlan routingPlan);  }
@Test void should_send_consumed_routing_plan_over_websocket() { routingPlanSender.consumePlan(RoutingPlan.empty()); verify(webSocket).convertAndSend( eq(WebSocketRoutingPlanSender.TOPIC_ROUTE), any(PortableRoutingPlan.class)); }