@Test
        void verifyNoEmailOrUser() throws Throwable {
            val context = MockRequestContext.create(applicationContext);

            var result = sendForgotUsernameInstructionsAction.execute(context);
            assertEquals(CasWebflowConstants.TRANSITION_ID_ERROR, result.getId());

            context.setParameter("email", "123456");
            result = sendForgotUsernameInstructionsAction.execute(context);
            assertEquals(CasWebflowConstants.TRANSITION_ID_ERROR, result.getId());

            context.setParameter("email", "casuser@baddomain.org");
            result = sendForgotUsernameInstructionsAction.execute(context);
            assertEquals(CasWebflowConstants.TRANSITION_ID_ERROR, result.getId());
            assertFalse(context.getFlashScope().contains(Principal.class.getName()));
        }
This is {@link SendForgotUsernameInstructionsActionTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-pm-webflow/src/test/java/org/apereo/cas/pm/web/flow/actions/SendForgotUsernameInstructionsActionTests.java