@Test
	public void testStringStartAlignAt2() throws Exception {

		Program testProgram = buildProgram("msvidctl.dll", false);

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

		String[] existingStrings = new String[] { "WDIMSVidOutputDeviceWW(#", "DLVideoWWWP-" };
		int[] offsets = new int[] { 0x5a2b4aea, 0x5a2b598e };
		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(1);

		// Verify these strings are not created when alignment is set to 4
		analyzer.setStringStartAlignment(4);
		analyzer.added(testProgram, null, monitor, manager.getMessageLog());

		for (Address currAddress : existingAddresses) {
			dataHere = listing.getDefinedDataAt(currAddress);
			assertNull(dataHere);
		}

		analyzer.setStringStartAlignment(2);
		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();

			assertEquals("\"" + existingStrings[i] + "\"", stringHere);
		}

	}
Test that adjusting the string alignment value to "2" works. The strings tested here
should be created when the alignment is set to 2, but not at alignment 4.

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