@Test
	public void testCreateStringOverUndefined() throws Exception {

		Program testProgram = buildProgram("stringOverUndefinedTest", false);

		Listing listing = testProgram.getListing();
		AddressSpace space = testProgram.getLanguage().getAddressFactory().getDefaultAddressSpace();
		Address addr = addr(space, 0x11000);

		// Create undefined data type at start and middle of string
		listing.createData(addr, Undefined.getUndefinedDataType(1));
		listing.createData(addr.add(3), Undefined.getUndefinedDataType(1));
		Data data = listing.getDefinedDataAt(addr);
		assertNotNull(data);

		// Run StringAnalyzer
		AutoAnalysisManager manager = AutoAnalysisManager.getAnalysisManager(testProgram);
		StringsAnalyzer analyzer = new StringsAnalyzer();
		analyzer.added(testProgram, null, monitor, manager.getMessageLog());

		// Make sure our string got created, despite the undefined being there
		data = listing.getDefinedDataAt(addr);
		assertNotNull(data);
		String type = data.getDataType().getName().toLowerCase();
		assertTrue("Data at address " + addr + " should be a type of string instead of " + type,
			type.contains("string"));
	}
Check that a string that intersects with an instruction (string's start address is the end
address of an instruction) is not created. The same string without instruction overlap
will be created.

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