### Question:
MavibotIndex extends AbstractIndex<K, String> { @Override public long lessThanCount( PartitionTxn partitionTxn, K attrVal ) throws LdapException { return forward.lessThanCount( partitionTxn, attrVal ); } MavibotIndex( String attributeId, boolean withReverse ); void init( SchemaManager schemaManager, AttributeType attributeType ); void setRecordManager( RecordManager rm ); void setWkDirPath( URI wkDirPath ); URI getWkDirPath(); long count( PartitionTxn partitionTxn ); long count( PartitionTxn partitionTxn, K attrVal ); @Override long greaterThanCount( PartitionTxn partitionTxn, K attrVal ); @Override long lessThanCount( PartitionTxn partitionTxn, K attrVal ); String forwardLookup( PartitionTxn partitionTxn, K attrVal ); K reverseLookup( PartitionTxn partitionTxn, String id ); synchronized void add( PartitionTxn partitionTxn, K attrVal, String id ); @Override synchronized void drop( PartitionTxn partitionTxn, K attrVal, String id ); void drop( PartitionTxn partitionTxn, String entryId ); @SuppressWarnings("unchecked") Cursor<IndexEntry<K, String>> forwardCursor( PartitionTxn partitionTxn ); Cursor<IndexEntry<K, String>> forwardCursor( PartitionTxn partitionTxn, K key ); @Override Cursor<K> reverseValueCursor( PartitionTxn partitionTxn, String id ); Cursor<String> forwardValueCursor( PartitionTxn partitionTxn, K key ); boolean forward( PartitionTxn partitionTxn, K attrVal ); boolean forward( PartitionTxn partitionTxn, K attrVal, String id ); @Override boolean reverse( PartitionTxn partitionTxn, String id ); @Override boolean reverse( PartitionTxn partitionTxn, String id, K attrVal ); @Override synchronized void close( PartitionTxn partitionTxn ); synchronized void sync(); @Override boolean isDupsEnabled(); String toString(); static final String FORWARD_BTREE; static final String REVERSE_BTREE; }### Answer:
@Test public void testLessThanCount() throws Exception { initIndex(); assertEquals( 0, idx.lessThanCount( partitionTxn, "z" ) ); for ( char ch = 'a'; ch <= 'z'; ch++ ) { idx.add( partitionTxn, String.valueOf( ch ), Strings.getUUID( ch ) ); } assertEquals( 10, idx.lessThanCount( partitionTxn, "z" ) ); }