@Test
	public void testStringEndAlignAt4() throws Exception {

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

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

		String[] existingStrings = new String[] { "TLOSS error\\r\\n", "SING error\\r\\n",
			"Microsoft Visual C++ Runtime Library", "GetLastActivePopup" };
		int[] offsets = new int[] { 0x300010d0, 0x300010e0, 0x30001348, 0x300013ac };
		int[] extraLength = new int[] { 2, 3, 3, 1 };

		Address[] existingAddresses = new Address[offsets.length];

		for (int i = 0; i < offsets.length; i++) {
			existingAddresses[i] = addr(space, offsets[i]);
		}

		Data dataHere;

		// Verify these strings do not exist prior to running the Strings Analyzer
		for (Address currAddress : existingAddresses) {
			dataHere = listing.getDefinedDataAt(currAddress);
			assertNull(dataHere);
		}

		AutoAnalysisManager manager = AutoAnalysisManager.getAnalysisManager(testProgram);

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

		String stringHere;

		for (int i = 0; i < existingStrings.length; i++) {
			// Verify string is actually there
			dataHere = listing.getDefinedDataAt(existingAddresses[i]);
			assertNotNull(dataHere);
			stringHere = dataHere.getDefaultValueRepresentation();

			// String will look something like --> "My String",00
			StringBuilder buildMyString = new StringBuilder("\"" + existingStrings[i] + "\"");

			assertEquals(buildMyString.toString(), stringHere);
		}
	}
Test that an end string alignment value of "4" (default value) works. Setting the end string
alignment looks for 00's to pad the string so that whatever follows this string is aligned
to the selected alignment. This should only work if the "require null termination" option
is enabled.

@throws Exception
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/string/StringsAnalyzerTest.java