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

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

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