@Test
    void verifyOK() throws Throwable {
        assertNotNull(qrAuthenticationChannelController);

        val tgt = new MockTicketGrantingTicket("casuser");
        ticketRegistry.addTicket(tgt);

        val deviceId = UUID.randomUUID().toString();
        qrAuthenticationDeviceRepository.authorizeDeviceFor(deviceId, tgt.getAuthentication().getPrincipal().getId());
        
        val payload = JwtBuilder.JwtRequest.builder()
            .subject("casuser")
            .jwtId(tgt.getId())
            .issuer(casProperties.getServer().getPrefix())
            .serviceAudience(Set.of("https://example.com/normal/"))
            .validUntilDate(DateTimeUtils.dateOf(LocalDate.now(Clock.systemUTC()).plusDays(1)))
            .attributes(Map.of(QRAuthenticationConstants.QR_AUTHENTICATION_DEVICE_ID, List.of(deviceId)))
            .build();
        val jwt = jwtBuilder.build(payload);

        val message = mock(Message.class);
        val nativeHeaders = new LinkedMultiValueMap<>();
        nativeHeaders.put(QRAuthenticationConstants.QR_AUTHENTICATION_CHANNEL_ID, List.of(UUID.randomUUID().toString()));
        nativeHeaders.put(QRAuthenticationConstants.QR_AUTHENTICATION_DEVICE_ID, List.of(deviceId));
        val headers = new MessageHeaders(Map.of("nativeHeaders", nativeHeaders));
        when(message.getHeaders()).thenReturn(headers);
        val token = String.format("{\"token\": \"%s\"}", jwt);
        when(message.getPayload()).thenReturn(token);
        assertTrue(qrAuthenticationChannelController.verify(message));
    }
This is {@link QRAuthenticationChannelControllerTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-qr-authentication/src/test/java/org/apereo/cas/qr/web/QRAuthenticationChannelControllerTests.java