protected Data createData(Address a, DataType dt) {

		int tx = program.startTransaction("Test");
		try {
			Data data =
				DataUtilities.createData(program, a, dt, 1, ClearDataMode.CHECK_FOR_SPACE);
			assertNotNull("Unable to apply data type at address: " + a, data);
			return data;
		}
		catch (Exception e) {
			failWithException("Unable to create data", e);
		}
		finally {
			program.endTransaction(tx, true);
		}

		return null; // can't get here
	}
A base class for use by tests that exercise various types of
{@link LocationDescriptor}.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/navigation/locationreferences/AbstractLocationReferencesTest.java