@Test
	public void testFailedRedoInvalidatesHistory() throws CommandExecutionException, Exception {
		History<ICommand> history = new History<>(new TestHistoryStrategy(), mock(EventBus.class));
		history.setMaximumCapacity(100);
		ICommand cmd = mock(ICommand.class);
		ICommand failingCmd = mock(ICommand.class);
		ICommand lastCmd = mock(ICommand.class);
		RuntimeException x = new RuntimeException("Foo");
		
		history.execute(cmd);
		history.execute(failingCmd);
		history.execute(lastCmd);
		history.undo();
		verify(lastCmd).undo();
		history.undo();
		verify(failingCmd).undo();
		Assert.assertTrue(history.hasFutureOperations());

		try {
			doThrow(x).when(failingCmd).redo();
			history.redo();
			Assert.fail("Exception not thrown");
		} catch(CommandExecutionException exception) {
			Assert.assertSame(x, exception.getCause());
		}
		Assert.assertFalse(history.hasPastOperations());
		Assert.assertFalse(history.hasFutureOperations());
	}