@Test
	public void testNavigationInCodeBrowser() throws Exception {
		QueryData queryData = new QueryData("sscanf", false);

		goToService.goToQuery(program.getMinAddress(), queryData, null, TaskMonitor.DUMMY);

		ProgramLocation loc = cb.getCurrentLocation();
		assertTrue(loc instanceof FunctionSignatureFieldLocation);

		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(prevAction, provider, true);
		cb.updateNow();
		assertEquals(cb.getCurrentAddress(), getAddr(0x01004194));
		assertTrue(cb.getCurrentLocation() instanceof OperandFieldLocation);

		performAction(prevAction, provider, true);
		cb.updateNow();
		assertEquals(cb.getCurrentAddress(), getAddr(0x01004192));
		assertTrue(cb.getCurrentLocation() instanceof LabelFieldLocation);

		performAction(prevAction, provider, true);
		cb.updateNow();
		assertEquals(cb.getCurrentAddress(), getAddr(0x01004176));
		assertTrue(cb.getCurrentLocation() instanceof OperandFieldLocation);

		performAction(prevAction, provider, true);
		cb.updateNow();
		assertEquals(cb.getCurrentAddress(), getAddr(0x0100416c));
		assertTrue(cb.getCurrentLocation() instanceof AddressFieldLocation);

		performAction(prevAction, provider, true);
		cb.updateNow();
		assertTrue(cb.getCurrentLocation() instanceof VariableXRefFieldLocation);

		performAction(prevAction, provider, true);
		cb.updateNow();
		assertTrue(cb.getCurrentLocation() instanceof FunctionReturnTypeFieldLocation);

		performAction(prevAction, provider, true);
		assertEquals(program.getMinAddress(), cb.getCurrentAddress());
	}
Tests for tool state history plugin.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/navigation/NavigationHistoryPluginTest.java