* We need at least 2 BINs, otherwise empty BINs won't be deleted. So
* we add keys until the BIN splits, then delete everything in the
* first BIN except the first two keys. Those are the keys we'll use
* for testing, and are key values 0 and 1.
*/
BIN firstBin = null;
OperationStatus status;
for (int i = 0;; i += 1) {
DatabaseEntry key = new DatabaseEntry(new byte[] { (byte) i });
status = db.put(null, key, entry0);
assertEquals(OperationStatus.SUCCESS, status);
Cursor cursor = db.openCursor(null, null);
status = cursor.getLast(keyFound, dataFound, null);
assertEquals(OperationStatus.SUCCESS, status);
BIN b = DbInternal.getCursorImpl(cursor).getBIN();
cursor.close();
if (firstBin == null) {
firstBin = b;
} else if (firstBin != b) {
/* Now delete all but the first two keys in the first BIN. */