@Test
	public void testEquals() throws DuplicateNameException, NotFoundException {

		ProgramFragment f = listing.getFragment("MyTree", addr(0));
		assertTrue(f1.equals(f));

		// test equals on address set
		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));
		AddressSet set = new AddressSet();
		set.addRange(addr(0), addr(0xa));
		set.addRange(addr(0x14), addr(0x1e));
		set.addRange(addr(0x28), addr(0x32));
		set.addRange(addr(0x3c), addr(0x46));

		assertTrue(f3.hasSameAddresses(set));

		set = set.subtract(new AddressSet(addr(0x28), addr(0x3d)));
		assertTrue(!f3.equals(set));
	}
Test the address iterator starting at a specific address.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/module/FragmentTest.java