@Test
public void overloadingStateMethodShouldThrowException() {

  IllegalStateException thrown = assertThrows(IllegalStateException.class,
          () -> scanner.getStateMethods(OverloadedStateMethodWorkflow.class));
  assertThat(thrown.getMessage(), containsString("OverloadedStateMethodWorkflow.end"));
  assertThat(thrown.getMessage(), containsString("Overloading state methods is not allowed."));
}