@Test
    void verifyOperation() throws Throwable {
        val resource = new FileSystemResource(Files.createTempFile("devices", ".json"));
        val repo = new JsonResourceQRAuthenticationDeviceRepository(resource);

        val device1 = UUID.randomUUID().toString();
        val device2 = UUID.randomUUID().toString();
        repo.removeAll();
        repo.authorizeDeviceFor(device1, "casuser");
        repo.authorizeDeviceFor(device2, "casuser");
        assertTrue(repo.isAuthorizedDeviceFor(device2, "casuser"));
        assertEquals(2, repo.getAuthorizedDevicesFor("casuser").size());
        repo.removeDevice(device1);
        assertEquals(1, repo.getAuthorizedDevicesFor("casuser").size());
    }
This is {@link JsonResourceQRAuthenticationDeviceRepositoryTests}.

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