@Test public void testGetStateDoesNotExist() throws Exception { flow.setStateTransitions(Collections.singletonList(StateTransition.createEndStateTransition(new StubState( "step1")))); flow.afterPropertiesSet(); State state = flow.getState("bar"); assertNull(state); }
@Test public void testGetStateExists() throws Exception { flow.setStateTransitions(Collections.singletonList(StateTransition.createEndStateTransition(new StubState( "step1")))); flow.afterPropertiesSet(); State state = flow.getState("step1"); assertNotNull(state); assertEquals("step1", state.getName()); }