@Test
public void missingStateVarAnnotationShouldThrowException() {

  IllegalStateException thrown = assertThrows(IllegalStateException.class,
          () -> scanner.getStateMethods(MissingStateVarWorkflow.class));
  assertThat(thrown.getMessage(), containsString("MissingStateVarWorkflow.end"));
  assertThat(thrown.getMessage(), containsString("missing @StateVar annotation"));
}