protected static <K, V> List<Entry<K, V>> toList(Iterator<Entry<K, V>> it) {
		List<Entry<K, V>> result = new ArrayList<>();
		while (it.hasNext()) {
			Entry<K, V> ent = it.next();
			result.add(new ImmutablePair<>(ent.getKey(), ent.getValue()));
		}
		return result;
	}
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