@Test
	public void testGetAddressSetView() throws CodeUnitInsertionException {
		assertEquals(b.range(0x0000, -0x0001),
			manager.codeUnits().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));
		assertEquals(b.range(0x0000, -0x0001),
			manager.data().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));
		assertNull(manager.definedUnits().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));
		assertNull(manager.instructions().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));
		assertNull(manager.definedData().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));
		assertEquals(b.range(0x0000, -0x0001),
			manager.undefinedData().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));

		assertEquals(b.range(0x4000, 0x400b),
			manager.codeUnits()
					.getAddressSetView(0, b.range(0x4000, 0x400b))
					.getRangeContaining(
						b.addr(0x4000)));
		assertNull(
			manager.codeUnits()
					.getAddressSetView(0, b.range(0x4000, 0x400b))
					.getRangeContaining(
						b.addr(0x3fff)));

		assertNull(
			manager.definedUnits()
					.getAddressSetView(0, b.range(0x4000, 0x4005))
					.getRangeContaining(
						b.addr(0x4003)));

		TraceData d4000;
		TraceData d4004;
		TraceInstruction i4008;
		try (Transaction tx = b.startTransaction()) {
			d4000 = b.addData(0, b.addr(0x4000), IntegerDataType.dataType, b.buf(1, 2, 3, 4));
			d4000.setEndSnap(9);
			d4004 = b.addData(0, b.addr(0x4004), IntegerDataType.dataType, b.buf(5, 6, 7, 8));
			d4004.setEndSnap(5);
			i4008 = b.addInstruction(0, b.addr(0x4008), b.host, b.buf(0xf4, 0));
			i4008.setEndSnap(9);
		}

		assertEquals(b.range(0x0000, -0x0001),
			manager.codeUnits().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));
		assertEquals(b.range(0x0000, 0x4007),
			manager.data().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));
		assertNull(manager.data().getAddressSetView(0).getRangeContaining(b.addr(0x4008)));
		assertEquals(b.range(0x4000, 0x4009),
			manager.definedUnits().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));
		assertNull(manager.definedUnits().getAddressSetView(0).getRangeContaining(b.addr(0x3fff)));
		assertEquals(b.range(0x4008, 0x4009),
			manager.instructions().getAddressSetView(0).getRangeContaining(b.addr(0x4008)));
		assertNull(manager.instructions().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));
		assertEquals(b.range(0x4000, 0x4007),
			manager.definedData().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));
		assertNull(manager.definedData().getAddressSetView(0).getRangeContaining(b.addr(0x4008)));
		assertEquals(b.range(0x0000, 0x3fff),
			manager.undefinedData().getAddressSetView(0).getRangeContaining(b.addr(0x3000)));
		assertNull(manager.undefinedData().getAddressSetView(0).getRangeContaining(b.addr(0x4000)));

		assertEquals(b.range(0x0000, -0x0001),
			manager.codeUnits().getAddressSetView(9).getRangeContaining(b.addr(0x4000)));
		assertEquals(b.range(0x0000, 0x4007),
			manager.data().getAddressSetView(9).getRangeContaining(b.addr(0x4000)));
		assertNull(manager.data().getAddressSetView(9).getRangeContaining(b.addr(0x4008)));
		assertEquals(b.range(0x4000, 0x4003),
			manager.definedUnits().getAddressSetView(9).getRangeContaining(b.addr(0x4000)));
		assertNull(manager.definedUnits().getAddressSetView(9).getRangeContaining(b.addr(0x4004)));
		assertEquals(b.range(0x4008, 0x4009),
			manager.instructions().getAddressSetView(9).getRangeContaining(b.addr(0x4008)));
		assertNull(manager.instructions().getAddressSetView(9).getRangeContaining(b.addr(0x4000)));
		assertEquals(b.range(0x4000, 0x4003),
			manager.definedData().getAddressSetView(9).getRangeContaining(b.addr(0x4000)));
		assertNull(manager.definedData().getAddressSetView(9).getRangeContaining(b.addr(0x4004)));
		assertEquals(b.range(0x0000, 0x3fff),
			manager.undefinedData().getAddressSetView(9).getRangeContaining(b.addr(0x3000)));
		assertNull(manager.undefinedData().getAddressSetView(9).getRangeContaining(b.addr(0x4000)));

		// See note in documentation regarding the -within- parameter
		assertEquals(b.range(0x4000, 0x4007),
			manager.definedUnits()
					.getAddressSetView(0, b.range(0x0000, 0x4005))
					.getRangeContaining(
						b.addr(0x4003)));
		// Check that the suggestion in the documentation yields the expected result
		assertEquals(b.range(0x4000, 0x4005),
			new IntersectionAddressSetView(
				manager.definedUnits().getAddressSetView(0, b.range(0x0000, 0x4005)),
				b.set(b.range(0x4000, 0x4005))).getRangeContaining(b.addr(0x4003)));
	}
This test is interesting because the pointer type def causes an update to the data type
settings <em>while the unit is still being created</em>. This will invalidate the trace's
caches. All of them, including the defined data units, which can become the cause of many
timing issues.
Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/listing/DBTraceCodeManagerTest.java