protected Instruction createInstruction(Program program, Address atAddress) {

		int txID = program.startTransaction("Create Instruction");
		boolean commit = false;
		try {
			Listing listing = program.getListing();
			Memory memory = program.getMemory();
			MemBuffer buf = new DumbMemBufferImpl(memory, atAddress);
			ProcessorContext context =
				new ProgramProcessorContext(program.getProgramContext(), atAddress);
			InstructionPrototype proto = program.getLanguage().parse(buf, context, false);
			Instruction createdInstruction =
				listing.createInstruction(atAddress, proto, buf, context, 0);
			commit = true;
			return createdInstruction;
		}
		catch (Exception e) {
			// Commit is false by default so nothing else to do.
			return null;
		}
		finally {
			program.endTransaction(txID, commit);
		}
	}
Test the merge of the versioned program's listing.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/AbstractListingMergeManagerTest.java