@Test
	public void testClearHistory() throws Exception {
		DockingActionIf clearAction = getAction(nextPrevPlugin, "Clear History Buffer");

		QueryData queryData = new QueryData("sscanf", false);
		goToService.goToQuery(program.getMinAddress(), queryData, null, TaskMonitor.DUMMY);

		ProgramLocation loc = cb.getCurrentLocation();

		assertTrue(cb.goToField(loc.getAddress(), VariableXRefFieldFactory.FIELD_NAME, 0, 0));
		click(cb, 2);

		assertTrue(cb.goToField(getAddr(0x1004176), OperandFieldFactory.FIELD_NAME, 0, 0));
		click(cb, 2);

		assertTrue(cb.goToField(getAddr(0x1004194), OperandFieldFactory.FIELD_NAME, 0, 0));
		click(cb, 2);

		performAction(clearAction, provider, true);
		assertFalse(plugin.hasNext(navigatable));
		assertFalse(plugin.hasPrevious(navigatable));
	}
Tests for tool state history plugin.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/navigation/NavigationHistoryPluginTest.java