private int countCodeUnits(ProgramFragment frag) {
		CodeUnitIterator iter = frag.getCodeUnits();
		int count = 0;

		while (iter.hasNext()) {
			iter.next();
			++count;
		}
		return count;
	}
Test the address iterator starting at a specific address.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/module/FragmentTest.java