@Test
    void verifyError() throws Throwable {
        val context = MockRequestContext.create(applicationContext);
        val attributes = new LocalAttributeMap("error", new IllegalArgumentException("Bad account"));
        context.setCurrentEvent(new Event(this, "processing", attributes));
        val request = PasswordlessAuthenticationRequest.builder().username("casuser").build();
        PasswordlessWebflowUtils.putPasswordlessAuthenticationAccount(context, passwordlessUserAccountStore.findUser(request).orElseThrow());
        assertEquals(CasWebflowConstants.TRANSITION_ID_SUCCESS, displayBeforePasswordlessAuthenticationAction.execute(context).getId());
    }
This is {@link DisplayBeforePasswordlessAuthenticationActionTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-passwordless-webflow/src/test/java/org/apereo/cas/web/flow/DisplayBeforePasswordlessAuthenticationActionTests.java