@Test
	public void testAcrossSpaces() {
		AddressSet a = set(rng(0x1000, 0x2000));
		AddressSet b = set(dRng(0x1000, 0x2000));

		List<Entry<AddressRange, Which>> expected;
		List<Entry<AddressRange, Which>> actual;

		expected = List.of(pair(0x1000, 0x2000, Which.LEFT), dPair(0x1000, 0x2000, Which.RIGHT));
		actual = toList(makeIterator(a, b, true));
		assertEquals(expected, actual);

		expected = List.of(pair(0x1000, 0x2000, Which.RIGHT), dPair(0x1000, 0x2000, Which.LEFT));
		actual = toList(makeIterator(b, a, true));
		assertEquals(expected, actual);

		expected = List.of(dPair(0x1000, 0x2000, Which.RIGHT), pair(0x1000, 0x2000, Which.LEFT));
		actual = toList(makeIterator(a, b, false));
		assertEquals(expected, actual);

		expected = List.of(dPair(0x1000, 0x2000, Which.LEFT), pair(0x1000, 0x2000, Which.RIGHT));
		actual = toList(makeIterator(b, a, false));
		assertEquals(expected, actual);
	}
Copies each entry into a new list, since the iterator may modify the entry in place

@param it the source iterator
@return the destination (new) list
Ghidra/Debug/ProposedUtils/src/test/java/ghidra/util/TwoWayBreakdownAddressRangeIteratorTest.java