@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)); }
@Override public Set<S> getStates() { return allStates; }
WorkflowDefinition extends AbstractWorkflowDefinition<S> { @Override public Set<S> getStates() { return allStates; } }
WorkflowDefinition extends AbstractWorkflowDefinition<S> { @Override public Set<S> getStates() { return allStates; } @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "findbugs does not understand that S extends both WorkflowState end Enum") protected  WorkflowDefinition(String type, S initialState, S errorState); @SuppressWarnings("unchecked") @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "findbugs does not understand that S extends both WorkflowState end Enum") protected  WorkflowDefinition(String type, S initialState, S errorState, WorkflowSettings settings); }
WorkflowDefinition extends AbstractWorkflowDefinition<S> { @Override public Set<S> getStates() { return allStates; } @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "findbugs does not understand that S extends both WorkflowState end Enum") protected  WorkflowDefinition(String type, S initialState, S errorState); @SuppressWarnings("unchecked") @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "findbugs does not understand that S extends both WorkflowState end Enum") protected  WorkflowDefinition(String type, S initialState, S errorState, WorkflowSettings settings); @Override Set<S> getStates(); }
WorkflowDefinition extends AbstractWorkflowDefinition<S> { @Override public Set<S> getStates() { return allStates; } @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "findbugs does not understand that S extends both WorkflowState end Enum") protected  WorkflowDefinition(String type, S initialState, S errorState); @SuppressWarnings("unchecked") @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "findbugs does not understand that S extends both WorkflowState end Enum") protected  WorkflowDefinition(String type, S initialState, S errorState, WorkflowSettings settings); @Override Set<S> getStates();  }