@Test
	public void testAddInstructionInScratch() throws CodeUnitInsertionException {
		try (Transaction tx = b.startTransaction()) {
			b.trace.getMemoryManager().putBytes(-5, b.addr(0x4001), b.buf(0xaa));
			TraceInstruction i4000 =
				b.addInstruction(-10, b.addr(0x4000), b.host, b.buf(0xf4, 0));
			assertEquals(Lifespan.span(-10, -6), i4000.getLifespan());

			TraceInstruction i4004 =
				b.addInstruction(-1, b.addr(0x4004), b.host, b.buf(0xf4, 0));
			assertEquals(Lifespan.span(-1, -1), i4004.getLifespan());

			TraceInstruction i4008 =
				b.addInstruction(-10, b.addr(0x4008), b.host, b.buf(0xf4, 0));
			assertEquals(Lifespan.span(-10, -1), i4008.getLifespan());
		}
	}
A dorked string type which ignores the maxLength parameter
Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/listing/DBTraceCodeManagerTest.java