@Test
    void verifyFlowIdExtraction() {
        val request = new MockHttpServletRequest();
        request.setContextPath("/tenants/unknown/abc");
        assertThrows(UnknownTenantException.class, () -> casDefaultFlowIdExtractor.extract(request, request.getContextPath()));
        request.setContextPath("/tenants/shire/abc");
        val flowId = casDefaultFlowIdExtractor.extract(request, request.getContextPath());
        assertEquals("abc", flowId);
        assertNotNull(request.getAttribute(TenantDefinition.class.getName()));
    }
This is {@link DefaultCasWebflowIdExtractorTests}.

@author Misagh Moayyed
@since 7.2.0
core/cas-server-core-webflow/src/test/java/org/apereo/cas/web/flow/DefaultCasWebflowIdExtractorTests.java