@Test
    void verifyFindByUsername() {
        try (val webServer = new MockWebServer(CollectionUtils.wrap("username", "casuser"))) {
            this.webServer = webServer;
            this.webServer.start();
            assertTrue(this.webServer.isRunning());
            val props = new RestEndpointProperties();
            props.setUrl("http://localhost:%s".formatted(webServer.getPort()));
            val repo = new OidcRestfulWebFingerUserInfoRepository(props);
            val results = repo.findByUsername("casuser");
            assertNotNull(results);
            assertTrue(results.containsKey("username"));
            assertEquals("casuser", results.get("username"));
        }
    }
This is {@link OidcRestfulWebFingerUserInfoRepositoryTests}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-oidc/src/test/java/org/apereo/cas/oidc/discovery/webfinger/OidcRestfulWebFingerUserInfoRepositoryTests.java