public static OAuth20RefreshToken getRefreshToken(final String serviceId, final String clientId) {
        val tgt = new MockTicketGrantingTicket(clientId);
        val refreshToken = mock(OAuth20RefreshToken.class);
        val service = RegisteredServiceTestUtils.getService(serviceId);
        when(refreshToken.getService()).thenReturn(service);
        service.getAttributes().put(OAuth20Constants.CLIENT_ID, List.of(clientId));
        when(refreshToken.getCreationTime()).thenReturn(ZonedDateTime.now(Clock.systemUTC()));
        val ticketId = OAuth20RefreshToken.PREFIX + "-%s".formatted(UUID.randomUUID().toString());
        when(refreshToken.getId()).thenReturn(ticketId);
        when(refreshToken.getTicketGrantingTicket()).thenReturn(tgt);
        when(refreshToken.getAuthentication()).thenReturn(tgt.getAuthentication());
        when(refreshToken.getClientId()).thenReturn(clientId);
        when(refreshToken.getExpirationPolicy()).thenReturn(NeverExpiresExpirationPolicy.INSTANCE);
        when(refreshToken.toString()).thenReturn(ticketId);
        return refreshToken;
    }
Gets refresh token.

@param serviceId the service id
@param clientId  the client id
@return the refresh token
support/cas-server-support-oauth/src/test/java/org/apereo/cas/OAuth20TestUtils.java