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

		List<Long> list = ((List<Entry<Long, ?>>) (List) Arrays
				.asList(entrySet.subSet(ent(-2), true, ent(2), true).toArray(new Entry[0])))
						.stream()
						.map(Entry::getKey)
						.collect(Collectors.toList());
		assertEquals(List.of(-1L, 1L), list);
		list = ((List<Entry<Long, ?>>) (List) Arrays
				.asList(entrySet.subSet(ent(-2), true, ent(2), true).toArray(new Entry[2])))
						.stream()
						.map(Entry::getKey)
						.collect(Collectors.toList());
		assertEquals(List.of(-1L, 1L), list);
		list = ((List<Entry<Long, ?>>) (List) Arrays
				.asList(entrySet.subSet(ent(-2), true, ent(2), true).toArray(new Entry[3])))
						.stream()
						.map(nullable(Entry::getKey))
						.collect(Collectors.toList());
		assertEquals(Arrays.asList(new Long[] { -1L, 1L, null }), list);

		List<Long> rList = ((List<Entry<Long, ?>>) (List) Arrays
				.asList(rEntrySet.subSet(ent(2), true, ent(-2), true).toArray(new Entry[0])))
						.stream()
						.map(Entry::getKey)
						.collect(Collectors.toList());
		assertEquals(List.of(1L, -1L), rList);
		rList = ((List<Entry<Long, ?>>) (List) Arrays
				.asList(rEntrySet.subSet(ent(2), true, ent(-2), true).toArray(new Entry[2])))
						.stream()
						.map(Entry::getKey)
						.collect(Collectors.toList());
		assertEquals(List.of(1L, -1L), rList);
		rList = ((List<Entry<Long, ?>>) (List) Arrays
				.asList(rEntrySet.subSet(ent(2), true, ent(-2), true).toArray(new Entry[3])))
						.stream()
						.map(nullable(Entry::getKey))
						.collect(Collectors.toList());
		assertEquals(Arrays.asList(new Long[] { 1L, -1L, null }), rList);
	}
This exists to verify behavior in {@link #testAsValuesSubIterator()}
Ghidra/Debug/ProposedUtils/src/test/java/ghidra/util/database/DBCachedObjectStoreTest.java