@Test
    void verifyTicketGrantingRemovalDoesNotRemoveAccessToken() throws Throwable {
        val service = addRegisteredService();
        service.setGenerateRefreshToken(true);
        service.setRenewRefreshToken(true);

        val result = assertClientOK(service, true);

        val at = ticketRegistry.getTicket(result.getKey(), OAuth20AccessToken.class);
        assertNotNull(at);
        assertNotNull(at.getTicketGrantingTicket());

        ticketRegistry.deleteTicket(at.getTicketGrantingTicket().getId());
        val at2 = ticketRegistry.getTicket(at.getId(), OAuth20AccessToken.class);
        assertNotNull(at2);

        val rt = ticketRegistry.getTicket(result.getRight(), OAuth20RefreshToken.class);
        assertNotNull(rt);

        val result2 = assertRefreshTokenOk(service, rt, createPrincipal());
        assertNotNull(result2.getKey());
    }
This class tests the {@link OAuth20AccessTokenEndpointController} class.

@author Jerome Leleu
@since 3.5.2
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/web/OAuth20RefreshTokenTests.java