@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 userCode = defaultDeviceUserCodeFactory.createDeviceUserCode(service);
        assertSame(OAuth20DeviceUserCode.class, oauth20DeviceUserCodeTicketCompactor.getTicketType());
        val compacted = oauth20DeviceUserCodeTicketCompactor.compact(userCode);
        assertNotNull(compacted);
        val result = (OAuth20DeviceUserCode) oauth20DeviceUserCodeTicketCompactor.expand(compacted);
        assertNotNull(result);
        assertEquals(result.getId(), userCode.getId());
    }
This is {@link OAuth20DeviceUserCodeCompactorTests}.

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