@Test
        void verifyAuthFails() throws Throwable {
            val context = MockRequestContext.create(applicationContext);
            val id = "https://app.%s.org#helloworld".formatted(UUID.randomUUID().toString());
            WebUtils.putServiceIntoFlowScope(context, RegisteredServiceTestUtils.getService(id));
            context.setParameter(CasProtocolConstants.PARAMETER_SERVICE, id);
            val registeredService = RegisteredServiceTestUtils.getRegisteredService(id);
            servicesManager.save(registeredService);
            WebUtils.putCredential(context, RegisteredServiceTestUtils.getCredentialsWithSameUsernameAndPassword(id));
            val event = initialAuthenticationAttemptWebflowEventResolver.resolveSingle(context);
            assertEquals(CasWebflowConstants.TRANSITION_ID_AUTHENTICATION_FAILURE, event.getId());
            assertTrue(event.getAttributes().contains(Credential.class.getName()));
            assertTrue(event.getAttributes().contains(WebApplicationService.class.getName()));
            val service = (WebApplicationService) event.getAttributes().get(WebApplicationService.class.getName());
            assertNotNull(service);
            assertEquals(service.getId(), id);
            assertEquals(service.getOriginalUrl(), id);
        }
This is {@link DefaultCasDelegatingWebflowEventResolverTests}.

@author Misagh Moayyed
@since 6.3.0
core/cas-server-core-webflow-mfa/src/test/java/org/apereo/cas/web/flow/resolver/impl/DefaultCasDelegatingWebflowEventResolverTests.java