@Test
    void verifyFragment() throws Throwable {
        val registeredService = getRegisteredService("example", CLIENT_SECRET, new LinkedHashSet<>());
        servicesManager.save(registeredService);
        val mv = oauthAuthorizationModelAndViewBuilder.build(registeredService, OAuth20ResponseModeTypes.FRAGMENT,
            "https://github.com/apereo/cas?one=value&two=value&code=123456",
            Map.of("code", "123456"));
        assertInstanceOf(RedirectView.class, mv.getView());
        val view = (RedirectView) mv.getView();
        assertTrue(mv.getModel().isEmpty());
        assertEquals("code=123456", new URI(view.getUrl()).getFragment());

    }
This is {@link DefaultOAuth20AuthorizationModelAndViewBuilderTests}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/web/response/callback/DefaultOAuth20AuthorizationModelAndViewBuilderTests.java