private void getSequenceTest(RheaKVStore store) {
        // regions: 1 -> [null, g), 2 -> [g, null)
        byte[] seqKey = makeKey("seq_test");
        checkRegion(store, seqKey, 2);
        Sequence sequence = store.bGetSequence(seqKey, 199);
        assertEquals(sequence.getStartValue(), 0);
        assertEquals(sequence.getEndValue(), 199);

        // get-only, do not update
        final long latestVal = store.bGetLatestSequence(seqKey);
        assertEquals(latestVal, 199);

        sequence = store.bGetSequence(seqKey, 10);
        assertEquals(sequence.getStartValue(), 199);
        assertEquals(sequence.getEndValue(), 209);

        sequence = store.bGetSequence(seqKey, 10);
        assertEquals(sequence.getStartValue(), 209);
        assertEquals(sequence.getEndValue(), 219);

        assertNull(store.bGet(seqKey));
        store.bResetSequence(seqKey);
        sequence = store.bGetSequence(seqKey, 11);
        assertEquals(sequence.getStartValue(), 0);
        assertEquals(sequence.getEndValue(), 11);
    }
Test method: {@link RheaKVStore#getSequence(byte[], int)}
jraft-rheakv/rheakv-core/src/test/java/com/alipay/sofa/jraft/rhea/storage/rhea/AbstractRheaKVStoreTest.java