class WebSocketController {

    @MessageMapping("/vehicle/{id}/delete")
    void removeVehicle(@DestinationVariable long id) {
        vehicleService.removeVehicle(id);
    }

}

class WebSocketControllerTest {

    @Mock
    private RouteListener routeListener;
    @Mock
    private RegionService regionService;
    @Mock
    private LocationService locationService;
    @Mock
    private VehicleService vehicleService;
    @Mock
    private DemoService demoService;
    @Mock
    private ApplicationEventPublisher eventPublisher;
    @InjectMocks
    private WebSocketController webSocketController;

    @Test
    void removeVehicle() {

        webSocketController.removeVehicle(11L);
        verify(vehicleService).removeVehicle(11);
    }

}