@Test
	public void testDoIntersect() throws Exception {
		AddressSet set = new AddressSet();
		set.addRange(addr(0x10), addr(0x20));
		set.addRange(addr(0x50), addr(0x500));
		AddressSetView view = f1.intersect(set);

		AddressSet expectedSet = new AddressSet();
		expectedSet.addRange(addr(0x10), addr(0x20));
		expectedSet.addRange(addr(0x50), addr(0xff));

		assertEquals(expectedSet, view);

		// an empty fragment should return an empty set
		ProgramFragment f3 = root.createFragment("frag3");
		assertEquals(new AddressSet(), f3.intersect(set));
	}
Test getting a code unit iterator over a fragment.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/module/FragmentTest.java