@Test
    public void testPreviousKey() throws PersistitException {
        setUpPrettyFullBufferWithChangingEbc(RED_FOX.length());
        ex.getKey().clear().append(Key.AFTER);
        for (int p = b1.getKeyBlockEnd(); p > 0; p -= KEYBLOCK_LENGTH) {
            ex.getKey().copyTo(ex.getAuxiliaryKey1());
            int result = b1.previousKey(ex.getKey(), p);
            if (p > b1.getKeyBlockStart()) {
                assertTrue("Key is out of sequence", ex.getKey().compareTo(ex.getAuxiliaryKey1()) < 0);
                assertEquals("Wrong result from previousKey", result & P_MASK, p - KEYBLOCK_LENGTH);
            }
        }
    }