@Test
    void verifyOAuthActionWithMDUI() throws Throwable {
        val svc = new OAuthRegisteredService();
        svc.setClientId("id");
        svc.setName("oauth");
        svc.setDescription("description");
        svc.setClientSecret("secret");
        svc.setInformationUrl("info");
        svc.setPrivacyUrl("privacy");
        svc.setServiceId("https://oauth\\.example\\.org.*");
        svc.setLogo("logo");
        servicesManager.save(svc);

        val ctx = MockRequestContext.create(applicationContext);
        val service = RegisteredServiceTestUtils.getService("https://www.example.org?client_id=id&client_secret=secret&redirect_uri=https://oauth.example.org");
        service.getAttributes().put(OAuth20Constants.CLIENT_ID, List.of("id"));
        
        WebUtils.putServiceIntoFlowScope(ctx, service);
        val event = oauth20RegisteredServiceUIAction.execute(ctx);
        assertEquals(CasWebflowConstants.TRANSITION_ID_SUCCESS, event.getId());
        val mdui = WebUtils.getServiceUserInterfaceMetadata(ctx, DefaultRegisteredServiceUserInterfaceInfo.class);
        assertNotNull(mdui);

        assertEquals(mdui.getDisplayName(), svc.getName());
        assertEquals(mdui.getInformationURL(), svc.getInformationUrl());
        assertEquals(mdui.getDescription(), svc.getDescription());
        assertEquals(mdui.getPrivacyStatementURL(), svc.getPrivacyUrl());
        assertEquals(mdui.getLogoUrl(), svc.getLogo());
    }
This is {@link OAuth20RegisteredServiceUIActionTests}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-oauth-webflow/src/test/java/org/apereo/cas/support/oauth/web/flow/OAuth20RegisteredServiceUIActionTests.java