@Test
	public void testOverlapMiddle() {
		AddressSet a = set(rng(0x3000, 0x5fff));
		AddressSet b = set(rng(0x4000, 0x4fff));

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

		expected = List.of(pair(0x3000, 0x3fff, Which.LEFT), pair(0x4000, 0x4fff, Which.BOTH),
			pair(0x5000, 0x5fff, Which.LEFT));
		actual = toList(makeIterator(a, b, true));
		assertEquals(expected, actual);

		expected = List.of(pair(0x3000, 0x3fff, Which.RIGHT), pair(0x4000, 0x4fff, Which.BOTH),
			pair(0x5000, 0x5fff, Which.RIGHT));
		actual = toList(makeIterator(b, a, true));
		assertEquals(expected, actual);

		expected = List.of(pair(0x5000, 0x5fff, Which.LEFT), pair(0x4000, 0x4fff, Which.BOTH),
			pair(0x3000, 0x3fff, Which.LEFT));
		actual = toList(makeIterator(a, b, false));
		assertEquals(expected, actual);

		expected = List.of(pair(0x5000, 0x5fff, Which.RIGHT), pair(0x4000, 0x4fff, Which.BOTH),
			pair(0x3000, 0x3fff, 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