assertNotNull( bt.find( "8" ) );
assertNull( bt.find( "9" ) );
// browse will position us right after "4" and getNext() will return 8
// since "5", "6", and "7" do not exist
TupleBrowser browser = bt.browse( "5" );
assertNotNull( browser );
Tuple tuple = new Tuple();
browser.getNext( tuple );
assertEquals( "8", tuple.getKey() );
// browse will position us right after "1" and getNext() will return 2
// since "2" exists.
browser = bt.browse( "2" );
assertNotNull( browser );
tuple = new Tuple();
browser.getNext( tuple );
assertEquals( "2", tuple.getKey() );
// browse will position us right after "8" and getNext() will null
// since nothing else exists past 8. We've come to the end.
browser = bt.browse( "9" );
assertNotNull( browser );
tuple = new Tuple();
browser.getNext( tuple );
assertNull( tuple.getKey() );
// browse will position us right before "1" and getPrevious() will
// null since nothing else exists before 1. We've come to the end.
// getNext() will however return "1".
browser = bt.browse( "0" );
assertNotNull( browser );
tuple = new Tuple();
browser.getPrevious( tuple );
assertNull( tuple.getKey() );
browser.getNext( tuple );
assertEquals( "1", tuple.getKey() );
}