@SuppressWarnings("unchecked")
	private List<Address> getHighlightAddresses() {
		CodeViewerService service = tool.getService(CodeViewerService.class);
		Object codeViewerProvider = getInstanceField("connectedProvider", service);
		Map<Program, ListingHighlightProvider> highlighterMap =
			(Map<Program, ListingHighlightProvider>) getInstanceField("programHighlighterMap",
				codeViewerProvider);
		ListingHighlightProvider highlightProvider = highlighterMap.get(program);

		assertEquals("The inner-class has been renamed", "MemoryMatchHighlighter",
			highlightProvider.getClass().getSimpleName());

		List<MemoryMatch> data = searchProvider.getSearchResults();
		return data.stream().map(result -> result.getAddress()).collect(Collectors.toList());
	}
Base class for memory search tests.
Ghidra/Features/Base/src/test.slow/java/ghidra/features/base/memsearch/AbstractMemSearchTest.java