@Test
	public void testMaxHistoryToSave() {

		int count = 0;
		SymbolIterator iter = program.getSymbolTable().getAllSymbols(true);
		Address currentAddr = program.getMinAddress();
		while (iter.hasNext()) {
			Symbol symbol = iter.next();
			if (symbol.isExternal()) {
				continue;// avoid the 'create association' dialog
			}

			++count;
			Address addr = currentAddr;
			runSwing(() -> goToService.goTo(addr, symbol.getAddress()));
			cb.updateNow();
			currentAddr = symbol.getAddress();
			if (count > 2 * NavigationHistoryPlugin.MAX_HISTORY_SIZE) {
				break;
			}
		}
		SaveState ss = new SaveState("test");
		plugin.writeDataState(ss);

		plugin.clear(navigatable);

		plugin.readDataState(ss);
		plugin.dataStateRestoreCompleted();

		for (int i = 0; i < NavigationHistoryPlugin.MAX_HISTORY_SIZE - 1; i++) {
			assertTrue(plugin.hasPrevious(navigatable));
			runSwing(() -> plugin.previous(navigatable));
			cb.updateNow();
		}
		assertFalse(plugin.hasPrevious(navigatable));
	}
Tests for tool state history plugin.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/navigation/NavigationHistoryPluginTest.java