@Test
    void verifyOperationCreate() throws Throwable {
        val registeredService = getRegisteredService("https://app.oauth.org", "clientid-at", "secret-at");
        registeredService.setAccessTokenExpirationPolicy(new DefaultRegisteredServiceOAuthAccessTokenExpirationPolicy("PT10S", "PT10S", 0));
        servicesManager.save(registeredService);
        val token = createAccessToken(new MockTicketGrantingTicket("casuser"), registeredService);
        assertNotNull(token);
        assertNotNull(defaultAccessTokenFactory.get(OAuth20AccessToken.class));
    }
This is {@link OAuth20DefaultAccessTokenFactoryTests}.

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