@Test public void findSmaller(){

    BTreeMap map = new BTreeMap(engine,6,true,false, null,null,null,null);
    for(int i=0;i<10000; i+=3){
        map.put(i, "aa"+i);
    }
    for(int i=0;i<10000; i+=1){
        Integer s = i - i%3;
        Map.Entry e = map.findSmaller(i,true);
        assertEquals(s,e!=null?e.getKey():null);
    }
    assertEquals(9999, map.findSmaller(100000,true).getKey());
    assertNull(map.findSmaller(0,false));
    for(int i=1;i<10000; i+=1){
        Integer s = i - i%3;
        if(s==i) s-=3;
        Map.Entry e = map.findSmaller(i,false);
        assertEquals(s,e!=null?e.getKey():null);
    }
    assertEquals(9999, map.findSmaller(100000,false).getKey());
}