class NaiveIndex extends Index {

  @Override
  public SeekingCurrentIterator handleGet(byte[] indexRangeStart,
      byte[] indexRangeEnd) {

    TableAdapter dataTable = getIndexTable();

    // Just need to return a SelectRowId on the rowId and use its
    // getResultsIterator
    // to return the row IDs
    KeyOnlyFilter selectRowId = new KeyOnlyFilter(dataTable, new CRange(
        indexRangeStart, indexRangeEnd));
    return selectRowId.getResultIterator();
  }

}

class NaiveIndexTest {

  private final String tableName;
  private NaiveIndex naiveIndex;
  private final byte[] aaaRowId;
  private final byte[] bbbRowId;
  private final byte[] cccRowId;
  private final ArrayList<byte[]> rowIdList;
  private final byte[] colFam;
  private final byte[] colQual;
  private final byte[] value;

  @Test
  public void testGetRange() {

    SeekingCurrentIterator indexIterator = naiveIndex.handleGet(cccRowId,
        cccRowId);

    // Test the returned data
    int count = 0;
    while (indexIterator.hasNext()) {
      Result result = indexIterator.next();
      count++;

      assertTrue(Bytes.compareTo(result.getRecordId(), cccRowId) == 0);
    }

    // Test if we have the expected number of results
    assertTrue(count == 1);
  }

}