@Test
	public void testOverlapErrors() throws CodeUnitInsertionException {
		try (Transaction tx = b.startTransaction()) {
			b.addData(0, b.addr(0x4000), IntegerDataType.dataType, b.buf(1, 2, 3, 4));

			try {
				b.addData(1, b.addr(0x4001), ByteDataType.dataType, 1);
				fail();
			}
			catch (CodeUnitInsertionException e) {
				// pass
			}

			try {
				b.addInstruction(1, b.addr(0x4001), b.host);
				fail();
			}
			catch (CodeUnitInsertionException e) {
				// pass
			}

			b.addInstruction(0, b.addr(0x4004), b.host, b.buf(0xf4, 0));

			try {
				b.addData(1, b.addr(0x4005), ByteDataType.dataType, 1);
				fail();
			}
			catch (CodeUnitInsertionException e) {
				// pass
			}

			try {
				b.addInstruction(1, b.addr(0x4005), b.host);
			}
			catch (CodeUnitInsertionException e) {
				// pass
			}
		}
	}
A dorked string type which ignores the maxLength parameter
Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/listing/DBTraceCodeManagerTest.java