@Test
	public void testOverlapAtExtremes() {
		AddressSet a = set(rng(0x0000, 0x0fff), rng(-0x2000, -0x0001));
		AddressSet b = set(rng(0x0000, 0x1fff), rng(-0x1000, -0x0001));

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

		expected = List.of(pair(0x0000, 0x0fff, Which.BOTH), pair(0x1000, 0x1fff, Which.RIGHT),
			pair(-0x2000, -0x1001, Which.LEFT), pair(-0x1000, -0x0001, Which.BOTH));
		actual = toList(makeIterator(a, b, true));
		assertEquals(expected, actual);

		expected = List.of(pair(0x0000, 0x0fff, Which.BOTH), pair(0x1000, 0x1fff, Which.LEFT),
			pair(-0x2000, -0x1001, Which.RIGHT), pair(-0x1000, -0x0001, Which.BOTH));
		actual = toList(makeIterator(b, a, true));
		assertEquals(expected, actual);

		expected = List.of(pair(-0x1000, -0x0001, Which.BOTH), pair(-0x2000, -0x1001, Which.LEFT),
			pair(0x1000, 0x1fff, Which.RIGHT), pair(0x0000, 0x0fff, Which.BOTH));
		actual = toList(makeIterator(a, b, false));
		assertEquals(expected, actual);

		expected = List.of(pair(-0x1000, -0x0001, Which.BOTH), pair(-0x2000, -0x1001, Which.RIGHT),
			pair(0x1000, 0x1fff, Which.LEFT), pair(0x0000, 0x0fff, Which.BOTH));
		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