private void checkTextFound(ArrayList<Address> startList, Class<?> fieldClass) {

		for (Address start : startList) {
			assertTrue("Search result not found: " + start, searcher.hasNext());
			ProgramLocation loc = searcher.next().programLocation();
			assertNotNull(loc);
			assertTrue(fieldClass.isAssignableFrom(loc.getClass()));
			assertEquals(start, loc.getAddress());
		}

		assertTrue(!searcher.hasNext());
	}
Test the searcher that searches fields in the Code Browser
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/searchtext/ListingDisplaySearcherTest.java