@Test
    void verifyOperationWithExpPolicy() throws Throwable {
        val registeredService = getRegisteredService("https://device.oauth.org", "clientid-device", "secret-at");
        registeredService.setDeviceTokenExpirationPolicy(new DefaultRegisteredServiceOAuthDeviceTokenExpirationPolicy("PT100S"));
        servicesManager.save(registeredService);
        val token = defaultDeviceTokenFactory.createDeviceCode(RegisteredServiceTestUtils.getService("https://device.oauth.org"));
        assertNotNull(token);
        assertNotNull(defaultAccessTokenFactory.get(OAuth20Code.class));
    }
This is {@link OAuth20DefaultDeviceTokenFactoryTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/ticket/device/OAuth20DefaultDeviceTokenFactoryTests.java