@Test void exception_handler_should_publish_error_event() { webSocketController.handleException(new Exception("test exception")); verify(eventPublisher).publishEvent(any(ErrorEvent.class)); }
@MessageExceptionHandler void handleException(Exception exception) { logger.error("Uncaught exception", exception); eventPublisher.publishEvent(new ErrorEvent(this, exception.toString())); }
WebSocketController { @MessageExceptionHandler void handleException(Exception exception) { logger.error("Uncaught exception", exception); eventPublisher.publishEvent(new ErrorEvent(this, exception.toString())); } }
WebSocketController { @MessageExceptionHandler void handleException(Exception exception) { logger.error("Uncaught exception", exception); eventPublisher.publishEvent(new ErrorEvent(this, exception.toString())); } @Autowired  WebSocketController(
            RouteListener routeListener,
            RegionService regionService,
            LocationService locationService,
            VehicleService vehicleService,
            DemoService demoService,
            ApplicationEventPublisher eventPublisher); }
WebSocketController { @MessageExceptionHandler void handleException(Exception exception) { logger.error("Uncaught exception", exception); eventPublisher.publishEvent(new ErrorEvent(this, exception.toString())); } @Autowired  WebSocketController(
            RouteListener routeListener,
            RegionService regionService,
            LocationService locationService,
            VehicleService vehicleService,
            DemoService demoService,
            ApplicationEventPublisher eventPublisher);  }
WebSocketController { @MessageExceptionHandler void handleException(Exception exception) { logger.error("Uncaught exception", exception); eventPublisher.publishEvent(new ErrorEvent(this, exception.toString())); } @Autowired  WebSocketController(
            RouteListener routeListener,
            RegionService regionService,
            LocationService locationService,
            VehicleService vehicleService,
            DemoService demoService,
            ApplicationEventPublisher eventPublisher);   }