@Override
 public void configure(StateMachineStateConfigurer<TestStates, TestEvents> states)
     throws Exception {
   @SuppressWarnings("unchecked")
   Collection<Action<TestStates, TestEvents>> entryActions = Arrays.asList(testEntryAction());
   @SuppressWarnings("unchecked")
   Collection<Action<TestStates, TestEvents>> exitActions = Arrays.asList(testExitAction());
   states
       .withStates()
       .initial(TestStates.S1)
       .state(TestStates.S1, null, exitActions)
       .state(TestStates.S2, entryActions, null);
 }
 @Override
 public void configure(StateMachineStateConfigurer<TestStates, TestEvents> states)
     throws Exception {
   states
       .withStates()
       .initial(TestStates.S1)
       .state(TestStates.S2)
       .and()
       .withStates()
       .parent(TestStates.S2)
       .initial(TestStates.S20)
       .state(TestStates.S201)
       .and()
       .withStates()
       .parent(TestStates.S2)
       .initial(TestStates.S21)
       .state(TestStates.S211);
 }
 @Override
 public void configure(StateMachineStateConfigurer<TestStates, TestEvents> states)
     throws Exception {
   states.withStates().initial(TestStates.S1).state(TestStates.SF).end(TestStates.SF);
 }
 @Override
 public void configure(StateMachineStateConfigurer<TestStates, TestEvents> states)
     throws Exception {
   states.withStates().initial(TestStates.S1).states(EnumSet.allOf(TestStates.class));
 }