@Test public void shouldRetrieveInitialTransitionWhenTransitionIsInitial() { final Transition calculatedInitial = InitialTransition.initialTransition(initialTransition); assertThat(calculatedInitial, notNullValue()); assertThat(calculatedInitial, equalTo(initialTransition)); }
public static Transition initialTransition(Transition transition) { Transition curr = transition; while (curr.previous().isPresent()) { curr = curr.previous().get(); } return curr; }
InitialTransition { public static Transition initialTransition(Transition transition) { Transition curr = transition; while (curr.previous().isPresent()) { curr = curr.previous().get(); } return curr; } }
InitialTransition { public static Transition initialTransition(Transition transition) { Transition curr = transition; while (curr.previous().isPresent()) { curr = curr.previous().get(); } return curr; }  }
InitialTransition { public static Transition initialTransition(Transition transition) { Transition curr = transition; while (curr.previous().isPresent()) { curr = curr.previous().get(); } return curr; }  static Transition initialTransition(Transition transition); }
InitialTransition { public static Transition initialTransition(Transition transition) { Transition curr = transition; while (curr.previous().isPresent()) { curr = curr.previous().get(); } return curr; }  static Transition initialTransition(Transition transition);  }