@Test
	public void testGetVarKeyRecordAtOrBefore() throws IOException {
		DBRecord[] recs = createRandomVarKeyTableRecords(null, 16000, 1);
		Arrays.sort(recs);
		Table table = dbh.getTable(table1Name);

		// At and Before tests
		for (int i = 1000; i < 16000; i += 1000) {
			DBRecord rec = table.getRecordAtOrBefore(recs[i].getKeyField());
			assertEquals(rec.getKeyField(), recs[i].getKeyField());
			int ix = findHoleBeforeVarKey(recs, i + 500);
			if (ix < 0) {
				Assert.fail("Bad test data");
			}
			rec = table.getRecordAtOrBefore(
				DBTestUtils.decrement((BinaryField) recs[ix].getKeyField(), MAX_VAR_KEY_LENGTH));
			assertEquals(recs[ix - 1].getKeyField(), rec.getKeyField());
		}

		// End tests
		Field firstKey = recs[0].getKeyField();
		DBRecord rec = table.getRecordAtOrBefore(firstKey);
		assertEquals(rec.getKeyField(), firstKey);
		rec = table.getRecordAtOrBefore(
			DBTestUtils.decrement((BinaryField) firstKey, MAX_VAR_KEY_LENGTH));
		assertNull(rec);
	}
Test key iterator.
@param testStoredDB test against a stored database if true, else test against cached database only.
@param recordCnt number of records to test
@param keyIncrement key increment, 0 = random
@param varDataSize size of variable length data fields.
@throws IOException
Ghidra/Framework/DB/src/test/java/db/DBVarKeyTableTest.java