@Test
public void getStatesWorks() {

  TestDefinitionWithStateTypes def = new TestDefinitionWithStateTypes("x", TestDefinitionWithStateTypes.State.initial);
  assertThat(def.getStates(),
      containsInAnyOrder(TestDefinitionWithStateTypes.State.initial, TestDefinitionWithStateTypes.State.done,
          TestDefinitionWithStateTypes.State.state1, TestDefinitionWithStateTypes.State.state2,
          TestDefinitionWithStateTypes.State.error));
}