public MockRequestContext addGlobalTransition(final String transitionId, final String targetState) {
        val targetResolver = new DefaultTargetStateResolver(targetState);
        val transition = new Transition(new DefaultTransitionCriteria(new LiteralExpression(transitionId)), targetResolver);
        getRootFlow().getGlobalTransitionSet().add(transition);
        return this;
    }
This is {@link MockRequestContext}.

@author Misagh Moayyed
@since 6.6.0
core/cas-server-core-util-api/src/test/java/org/apereo/cas/util/MockRequestContext.java