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

            context.setParameter("username", "casuser");
            context.setParameter("email", "casuser@apereo.org");
            val resultEvent = sendForgotUsernameInstructionsAction.execute(context);
            assertEquals(CasWebflowConstants.TRANSITION_ID_SUCCESS, resultEvent.getId());

            val resultAttributeName = new EventFactorySupport().getResultAttributeName();
            val emailResult = resultEvent.getAttributes().get(resultAttributeName, EmailCommunicationResult.class);
            assertTrue(emailResult.isSuccess());
            assertEquals("Hello CAS with email casuser@apereo.org, your affiliation is developer", emailResult.getBody());
        }
This is {@link SendForgotUsernameInstructionsActionEmailMessageBodyTests}.

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