@ParameterizedTest
    @MethodSource("codeProvider")
    void verifyOperation(final Service service, final String clientId) throws Throwable {
        val registeredService = getRegisteredService(service.getId(), clientId, "secret-at");
        servicesManager.save(registeredService);
        val deviceCode = defaultDeviceTokenFactory.createDeviceCode(service);
        deviceCode.setUserCode(UUID.randomUUID().toString());
        assertSame(OAuth20DeviceToken.class, oauth20DeviceTokenTicketCompactor.getTicketType());
        val compacted = oauth20DeviceTokenTicketCompactor.compact(deviceCode);
        assertNotNull(compacted);
        val result = (OAuth20DeviceToken) oauth20DeviceTokenTicketCompactor.expand(compacted);
        assertNotNull(result);
        assertEquals(result.getUserCode(), deviceCode.getUserCode());
    }
This is {@link OAuth20DeviceTokenCompactorTests}.

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