@SuppressWarnings("unchecked")
	@Test
	public void testAsEntrySetSubToArray() {
		populateStore(-3, 3, 1, -1);

		List<Long> list = new ArrayList<>(store.getRecordCount());
		for (Object o : entrySet.subSet(ent(-2), true, ent(2), true).toArray()) {
			list.add(((Entry<Long, ?>) o).getKey());
		}
		assertEquals(List.of(-1L, 1L), list);

		List<Long> rList = new ArrayList<>(store.getRecordCount());
		for (Object o : rEntrySet.subSet(ent(2), true, ent(-2), true).toArray()) {
			rList.add(((Entry<Long, ?>) o).getKey());
		}
		assertEquals(List.of(1L, -1L), rList);
	}
This exists to verify behavior in {@link #testAsValuesSubIterator()}
Ghidra/Debug/ProposedUtils/src/test/java/ghidra/util/database/DBCachedObjectStoreTest.java