@Test(expected = ValidationException.class)
    public void parallelState_WithChoiceThatHasNoTerminalPath_IsNotValid() {
        assertDoesNotHaveTerminalPath(
                stateMachine()
                        .startAt("Parallel")
                        .state("Parallel", parallelState()
                                .transition(end())
                                .branch(branch()
                                                .startAt("Initial")
                                                .state("Initial", passState()
                                                        .transition(next("Choice")))
                                                .state("Choice", choiceState()
                                                        .defaultStateName("Default")
                                                        .choice(choice()
                                                                        .transition(next("Initial"))
                                                                        .condition(eq("$.foo", "bar")))
                                                        .choice(choice()
                                                                        .transition(next("Default"))
                                                                        .condition(eq("$.foo", "bar"))))
                                                .state("Default", passState().transition(next("Choice"))))));
    }
While the nested ChoiceTwo state only has cycles, it has a cycle out of the choice state to
a state that contains a path to a terminal. The validator doesn't validate that the path out actually
has a path to the terminal so there are some invalid state machines that will pass validation.
aws-java-sdk-stepfunctions/src/test/java/com/amazonaws/services/stepfunctions/builder/internal/validation/CycleTest.java