@Test
	public void test8051CodeUnitIteratorUsingPropertyMethod() throws Exception {
		program.release(this);
		ProgramBuilder builder = new ProgramBuilder("8051", ProgramBuilder._8051, this);

		builder.createMemory("CODE", "CODE:0100", 0x100);
		builder.createMemory("EXTMEM", "EXTMEM:0000", 0x100);
		builder.createMemory("SFR", "SFR:0000", 0x100);

		builder.disassemble("CODE:0100", 10);

		program = builder.getProgram();

		// make sure we can get an interator over multiple address spaces
		CodeUnitIterator iter =
			program.getListing().getCodeUnitIterator(CodeUnit.INSTRUCTION_PROPERTY, true);
		int cnt = 0;
		while (iter.hasNext()) {
			iter.next();
			++cnt;
		}
		assertEquals(10, cnt);
	}
** Diagnostic Aid ** Open program in tool
@throws Exception
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/code/CodeUnitIteratorTest.java