@Test
	public void testGetAddressRanges() throws Exception {
		ProgramFragment f3 = root.createFragment("Frag3");
		f3.move(addr(0), addr(0xa));
		f3.move(addr(0x14), addr(0x1e));
		f3.move(addr(0x28), addr(0x32));
		f3.move(addr(0x3c), addr(0x46));

		AddressRangeIterator iter = f3.getAddressRanges();
		int count = 0;
		while (iter.hasNext()) {
			AddressRange range = iter.next();
			++count;
			if (count == 3) {
				assertEquals(new AddressRangeImpl(addr(0x28), addr(0x32)), range);
			}
		}
		assertEquals(4, count);
	}
Test getting a code unit iterator over a fragment.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/module/FragmentTest.java