private void createCharArray(Address addr) {
		Listing listing = program.getListing();
		Data d = listing.getDataAt(addr);
		assertNotNull("expected existing data", d);
		int length = d.getLength();
		int txId = program.startTransaction("create char array");
		try {
			listing.clearCodeUnits(addr, addr, true);
			listing.createData(addr, new ArrayDataType(CharDataType.dataType, length, 1));
		}
		catch (CodeUnitInsertionException e) {
			fail("failed to create char array at " + addr);
		}
		finally {
			program.endTransaction(txId, true);
		}
	}
Clear data and create char array of the same size as previous data
@param addr data address
Ghidra/Features/Base/src/test.slow/java/ghidra/app/util/viewer/field/OperandFieldFactoryTest.java