void () { pushTwoStates(); assertFalse(myHistory.isForwardAvailable()); assertTrue(myHistory.isBackAvailable()); myHistory.back(); assertTrue(myHistory.isBackAvailable()); assertTrue(myHistory.isForwardAvailable()); assertSame(myState2, myEditorState); myHistory.back(); assertFalse(myHistory.isBackAvailable()); assertTrue(myHistory.isForwardAvailable()); assertSame(myState1, myEditorState); myHistory.forward(); assertTrue(myHistory.isBackAvailable()); assertTrue(myHistory.isForwardAvailable()); assertSame(myState2, myEditorState); myHistory.forward(); assertTrue(myHistory.isBackAvailable()); assertFalse(myHistory.isForwardAvailable()); assertSame(myState3, myEditorState); }