@Test
    public void testSplitAtEqualsInsertAt() throws Exception {
        b1.init(Buffer.PAGE_TYPE_DATA);
        b2.init(Buffer.PAGE_TYPE_DATA);
        ex.clear();
        setUpValue(true, RED_FOX.length());

        // count how many will fit
        int a;
        for (a = 1;; a++) {
            ex.to(String.format("%6dz", a));
            if (b1.putValue(ex.getKey(), vw) == -1) {
                break;
            }
        }

        b1.init(Buffer.PAGE_TYPE_DATA);
        for (int b = 1; b < a - 1; b++) {
            ex.to(String.format("%6dz", b));
            b1.putValue(ex.getKey(), vw);
        }

        ex.getValue().clear();
        ex.to(String.format("%6dz", a - 1));
        assertTrue("Expected empty value to fit at end of buffer", b1.putValue(ex.getKey(), vw) != -1);
        /*
         * Split on key being inserted.
         */
        setUpValue(true, RED_FOX.length());
        ex.to(String.format("%6d", a / 2 + 1));
        int foundAt1 = b1.findKey(ex.getKey());
        assertTrue("Expect FIXUP_REQUIRED flag", (foundAt1 & FIXUP_MASK) != 0);
        int splitAt1 = b1.split(b2, ex.getKey(), vw, foundAt1, ex.getAuxiliaryKey1(), Exchange.Sequence.NONE,
                SplitPolicy.EVEN_BIAS);
        assertTrue("Split failed", splitAt1 != -1);
        assertTrue("Verify failed", b1.verify(null, null) == null);
        assertTrue("Verify failed", b2.verify(null, null) == null);

        /*
         * Restore buffer setup
         */
        b1.init(Buffer.PAGE_TYPE_DATA);
        b2.init(Buffer.PAGE_TYPE_DATA);
        b1.init(Buffer.PAGE_TYPE_DATA);
        setUpValue(true, RED_FOX.length());
        for (int b = 1; b < a - 1; b++) {
            ex.to(String.format("%6dz", b));
            b1.putValue(ex.getKey(), vw);
        }

        /*
         * Split on key being replaced
         */
        ex.getValue().clear();
        ex.to(String.format("%6dz", a - 1));
        assertTrue("Expected empty value to fit at end of buffer", b1.putValue(ex.getKey(), vw) != -1);
        setUpValue(true, RED_FOX.length());
        ex.to(String.format("%6dz", a / 2));
        int foundAt2 = b1.findKey(ex.getKey());
        assertTrue("Expect EXACT flag", (foundAt2 & Buffer.EXACT_MASK) != 0);
        setUpValue(true, RED_FOX.length() * 2);
        int splitAt2 = b1.split(b2, ex.getKey(), vw, foundAt2, ex.getAuxiliaryKey1(), Exchange.Sequence.NONE,
                SplitPolicy.EVEN_BIAS);
        assertTrue("Split failed", splitAt2 != -1);
        assertTrue("Verify failed", b1.verify(null, null) == null);
        assertTrue("Verify failed", b2.verify(null, null) == null);

        /*
         * Restore buffer setup
         */
        b1.init(Buffer.PAGE_TYPE_DATA);
        b2.init(Buffer.PAGE_TYPE_DATA);
        b1.init(Buffer.PAGE_TYPE_DATA);
        setUpValue(true, RED_FOX.length());
        for (int b = 1; b < a - 1; b++) {
            ex.to(String.format("%6dz", b));
            b1.putValue(ex.getKey(), vw);
        }

        /*
         * Split on key being replaced at end of buffer
         */
        ex.getValue().clear();
        ex.to(String.format("%6dz", a - 1));
        assertTrue("Expected empty value to fit at end of buffer", b1.putValue(ex.getKey(), vw) != -1);
        setUpValue(true, RED_FOX.length());
        ex.to(String.format("%6dz", a - 2));
        int foundAt3 = b1.findKey(ex.getKey());
        assertTrue("Expect EXACT flag", (foundAt3 & Buffer.EXACT_MASK) != 0);
        setUpValue(true, RED_FOX.length() * 2);
        int splitAt3 = b1.split(b2, ex.getKey(), vw, foundAt3, ex.getAuxiliaryKey1(), Exchange.Sequence.NONE,
                SplitPolicy.RIGHT_BIAS);
        assertTrue("Split failed", splitAt3 != -1);
        assertTrue("Verify failed", b1.verify(null, null) == null);
        assertTrue("Verify failed", b2.verify(null, null) == null);
    }