private void verifyAction(final String currentEvent) throws Exception {
        val context = MockRequestContext.create();

        val action = new ClearWebflowCredentialAction();
        context.setCurrentEvent(null);
        assertNull(action.execute(context));

        context.setCurrentEvent(new Event(this, CasWebflowConstants.TRANSITION_ID_SUCCESS));
        assertNull(action.execute(context));

        WebUtils.putCredential(context, CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword());
        val flow = (Flow) context.getActiveFlow();
        val factory = mock(VariableValueFactory.class);
        when(factory.createInitialValue(any())).thenReturn(CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword());
        val variable = new FlowVariable(CasWebflowConstants.VAR_ID_CREDENTIAL, factory);
        flow.addVariable(variable);
        context.setCurrentEvent(new Event(this, currentEvent));
        assertNull(action.execute(context));
        assertNotNull(WebUtils.getCredential(context));
        assertNotNull(context.getConversationScope().get(Credential.class.getName()));
    }
This is {@link ClearWebflowCredentialActionTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-webflow/src/test/java/org/apereo/cas/web/flow/actions/ClearWebflowCredentialActionTests.java