private void clearSelectedBytes(Address address, long length) {
		AddressSet addressSet = new AddressSet(address);
		for (int i = 1; i < length; i++) {
			addressSet.add(address.add(i));
		}

		int startTransaction = program.startTransaction("Test - Clear Bytes");
		try {
			ClearCmd clearCmd = new ClearCmd(addressSet);
			clearCmd.applyTo(program);
		}
		finally {
			program.endTransaction(startTransaction, true);
		}
	}
Note: This test is sensitive to focus. So, don't click any windows while this test is running.
Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/app/plugin/core/clipboard/ClipboardPluginTest.java