@Test
        void verifyOperationWithExpPolicy() throws Throwable {
            val registeredService = getRegisteredService("https://rt.oauth.org", "clientid-rt", "secret-at");
            registeredService.setRefreshTokenExpirationPolicy(
                new DefaultRegisteredServiceOAuthRefreshTokenExpirationPolicy("PT100S", 0));
            servicesManager.save(registeredService);
            val ticketGrantingTicket = new MockTicketGrantingTicket("casuser");
            val token = createRefreshToken(ticketGrantingTicket, registeredService);
            assertNotNull(token);
            assertNotNull(defaultAccessTokenFactory.get(OAuth20RefreshToken.class));
            assertInstanceOf(OAuth20RefreshTokenExpirationPolicy.class, token.getExpirationPolicy());
        }
This is {@link OAuth20DefaultRefreshTokenFactoryTests}.

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