@Override
 public StateContext<S, E> preTransition(StateContext<S, E> stateContext) {
   Transition<S, E> transition = stateContext.getTransition();
   SecurityRule rule = transition.getSecurityRule();
   if (rule != null) {
     decide(rule, transition);
   }
   return super.preTransition(stateContext);
 }
 private void decide(
     AccessDecisionManager manager,
     Authentication authentication,
     Transition<S, E> object,
     Collection<ConfigAttribute> configAttributes) {
   if (manager.supports(object.getClass())) {
     manager.decide(authentication, object, configAttributes);
   }
 }