protected OAuth20RefreshToken newRefreshToken(final OAuth20AccessToken at) throws Throwable {
        val testService = CoreAuthenticationTestUtils.getService("https://service.example.com");
        val rt = defaultRefreshTokenFactory.create(testService, at.getAuthentication(),
            at.getTicketGrantingTicket(), new ArrayList<>(), "clientid12345", at.getId(),
            new HashMap<>(), OAuth20ResponseTypes.CODE, OAuth20GrantTypes.AUTHORIZATION_CODE);
        ((TicketGrantingTicket) at.getTicketGrantingTicket()).getDescendantTickets().add(rt.getId());
        return rt;
    }
This is {@link BaseOAuth20ExpirationPolicyTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/ticket/BaseOAuth20ExpirationPolicyTests.java