@Test
	public void testMoveAddresses() throws Exception {

		ProgramModule defaultRoot = listing.createRootModule("Default");
		ProgramFragment frag = listing.getFragment("Default", addr(0));
		assertNotNull(frag);
		assertEquals(0x100, frag.getNumAddresses());
		ProgramModule m = defaultRoot.createModule("Module-A");
		ProgramFragment frag1 = m.createFragment("Fragment-1");
		frag1.move(addr(0), addr(25));
		assertEquals(26, frag1.getNumAddresses());
		assertEquals(230, frag.getNumAddresses());

		ProgramFragment frag2 = m.createFragment("Frag-2");
		frag2.move(addr(20), addr(40));

		assertEquals(21, frag2.getNumAddresses());
		assertEquals(20, frag1.getNumAddresses());
		assertEquals(215, frag.getNumAddresses());
	}
Test getting a code unit iterator over a fragment.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/module/FragmentTest.java