@Test
	public void testNoCoalesceAcrossByteChanges() throws Exception {
		try (Transaction tx = b.startTransaction()) {
			DBTraceMemoryManager memory = b.trace.getMemoryManager();
			DBTraceCodeManager code = b.trace.getCodeManager();

			memory.createRegion(".text", 0, b.range(0x00400000, 0x00400fff));
			Assembler asm = Assemblers.getAssembler(b.language);
			Address entry = b.addr(0x00400000);
			AssemblyBuffer buf = new AssemblyBuffer(asm, entry);
			buf.assemble("imm r0, #123");
			buf.assemble("mov r1, r0");
			buf.assemble("ret");

			memory.putBytes(-1, entry, ByteBuffer.wrap(buf.getBytes()));

			AddressFactory factory = b.trace.getBaseAddressFactory();
			Disassembler dis =
				Disassembler.getDisassembler(b.language, factory, TaskMonitor.DUMMY, null);
			InstructionSet set = new InstructionSet(factory);
			set.addBlock(dis.pseudoDisassembleBlock(memory.getBufferAt(-1, entry), null, 10));

			TraceAddressSnapRange all =
				new ImmutableTraceAddressSnapRange(b.range(0, -1), Lifespan.ALL);
			code.instructions().addInstructionSet(Lifespan.nowOn(-1), set, true);
			/**
			 * This is already a bogus sort of operation: The prototypes may not match the bytes. In
			 * any case, we should not expect coalescing.
			 */
			code.instructions().addInstructionSet(Lifespan.nowOn(0), set, true);
			List<TraceCodeUnit> units = toList(code.definedUnits().getIntersecting(all));
			assertEquals(6, units.size());
		}
	}
Technically, getIntersecting makes no guarantee regarding order.
Nevertheless, the structure shouldn't be perturbed, so I think it's fair to
expect the same order.
Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/program/DBTraceDisassemblerIntegrationTest.java