@Test
	public void testFindValidStrings() throws Exception {

		Program testProgram = buildProgram("notepad.exe", false);

		Listing listing = testProgram.getListing();
		AddressSpace space = testProgram.getLanguage().getAddressFactory().getDefaultAddressSpace();

		// These are the strings that we expect to find, with their corresponding offsets
		String[] strings =
			new String[] { "Notepad", "Now Printing", "Paper", "NpSaveDialog", "Preview" };
		int[] offsets = new int[] { 0x1008018, 0x100d612, 0x100d72e, 0x10013b0, 0x100daaa };

		HashMap<Address, String> addressToValueMap = new HashMap<>();

		// Translate offsets to addresses
		for (int i = 0; i < offsets.length; i++) {
			addressToValueMap.put(addr(space, offsets[i]), strings[i]);
		}

		Data data;

		// Verify these strings aren't already there
		for (Address strAddr : addressToValueMap.keySet()) {
			data = listing.getDefinedDataAt(strAddr);
			assertNull(data);
		}

		AutoAnalysisManager manager = AutoAnalysisManager.getAnalysisManager(testProgram);

		StringsAnalyzer analyzer = new StringsAnalyzer();
		analyzer.setStringEndAlignment(1);
		analyzer.added(testProgram, null, monitor, manager.getMessageLog());

		String type, actualValue, toMatch;

		// Verify that each expected string is there
		for (Address strAddr : addressToValueMap.keySet()) {
			toMatch = "u\"" + addressToValueMap.get(strAddr) + "\"";

			data = listing.getDefinedDataAt(strAddr);
			assertNotNull(data);

			type = data.getDataType().getName().toLowerCase();
			assertTrue("Data at address " + strAddr + " should be a type of string!",
				(type.contains("unicode") || type.contains("string")));

			actualValue = data.getDefaultValueRepresentation();
			assertEquals(toMatch, actualValue);
		}
	}
Check that some simple strings that we expect to find are found, at the correct addresses.
@throws Exception
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/string/StringsAnalyzerTest.java