public void testQualifierFilter() throws Exception {
  long expectedRows=this.numRows / 2;
  long expectedKeys=2;
  Filter f=new QualifierFilter(CompareOp.EQUAL,new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
  Scan s=new Scan();
  s.setFilter(f);
  verifyScanNoEarlyOut(s,expectedRows,expectedKeys);
  expectedRows=this.numRows / 2;
  expectedKeys=2;
  f=new QualifierFilter(CompareOp.LESS,new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
  s=new Scan();
  s.setFilter(f);
  verifyScanNoEarlyOut(s,expectedRows,expectedKeys);
  expectedRows=this.numRows / 2;
  expectedKeys=4;
  f=new QualifierFilter(CompareOp.LESS_OR_EQUAL,new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
  s=new Scan();
  s.setFilter(f);
  verifyScanNoEarlyOut(s,expectedRows,expectedKeys);
  expectedRows=this.numRows / 2;
  expectedKeys=4;
  f=new QualifierFilter(CompareOp.NOT_EQUAL,new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
  s=new Scan(HConstants.EMPTY_START_ROW,Bytes.toBytes("testRowTwo"));
  s.setFilter(f);
  verifyScanNoEarlyOut(s,expectedRows,expectedKeys);
  expectedRows=this.numRows / 2;
  expectedKeys=4;
  f=new QualifierFilter(CompareOp.GREATER_OR_EQUAL,new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
  s=new Scan(HConstants.EMPTY_START_ROW,Bytes.toBytes("testRowTwo"));
  s.setFilter(f);
  verifyScanNoEarlyOut(s,expectedRows,expectedKeys);
  expectedRows=this.numRows / 2;
  expectedKeys=2;
  f=new QualifierFilter(CompareOp.GREATER,new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
  s=new Scan(HConstants.EMPTY_START_ROW,Bytes.toBytes("testRowTwo"));
  s.setFilter(f);
  verifyScanNoEarlyOut(s,expectedRows,expectedKeys);
  f=new QualifierFilter(CompareOp.NOT_EQUAL,new BinaryComparator(QUALIFIERS_ONE[2]));
  s=new Scan();
  s.setFilter(f);
  KeyValue[] kvs={new KeyValue(ROWS_ONE[0],FAMILIES[0],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[0],FAMILIES[0],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_ONE[0],FAMILIES[1],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[0],FAMILIES[1],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_ONE[2],FAMILIES[0],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[2],FAMILIES[0],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_ONE[2],FAMILIES[1],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[2],FAMILIES[1],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_ONE[3],FAMILIES[0],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[3],FAMILIES[0],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_ONE[3],FAMILIES[1],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[3],FAMILIES[1],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_TWO[0],FAMILIES[0],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[0],FAMILIES[0],QUALIFIERS_TWO[2],VALUES[1]),new KeyValue(ROWS_TWO[0],FAMILIES[0],QUALIFIERS_TWO[3],VALUES[1]),new KeyValue(ROWS_TWO[0],FAMILIES[1],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[0],FAMILIES[1],QUALIFIERS_TWO[2],VALUES[1]),new KeyValue(ROWS_TWO[0],FAMILIES[1],QUALIFIERS_TWO[3],VALUES[1]),new KeyValue(ROWS_TWO[2],FAMILIES[0],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[2],FAMILIES[0],QUALIFIERS_TWO[2],VALUES[1]),new KeyValue(ROWS_TWO[2],FAMILIES[0],QUALIFIERS_TWO[3],VALUES[1]),new KeyValue(ROWS_TWO[2],FAMILIES[1],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[2],FAMILIES[1],QUALIFIERS_TWO[2],VALUES[1]),new KeyValue(ROWS_TWO[2],FAMILIES[1],QUALIFIERS_TWO[3],VALUES[1]),new KeyValue(ROWS_TWO[3],FAMILIES[0],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[3],FAMILIES[0],QUALIFIERS_TWO[2],VALUES[1]),new KeyValue(ROWS_TWO[3],FAMILIES[0],QUALIFIERS_TWO[3],VALUES[1]),new KeyValue(ROWS_TWO[3],FAMILIES[1],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[3],FAMILIES[1],QUALIFIERS_TWO[2],VALUES[1]),new KeyValue(ROWS_TWO[3],FAMILIES[1],QUALIFIERS_TWO[3],VALUES[1])};
  verifyScanFull(s,kvs);
  f=new QualifierFilter(CompareOp.NOT_EQUAL,new RegexStringComparator("test.+-2"));
  s=new Scan();
  s.setFilter(f);
  kvs=new KeyValue[]{new KeyValue(ROWS_ONE[0],FAMILIES[0],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[0],FAMILIES[0],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_ONE[0],FAMILIES[1],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[0],FAMILIES[1],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_ONE[2],FAMILIES[0],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[2],FAMILIES[0],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_ONE[2],FAMILIES[1],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[2],FAMILIES[1],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_ONE[3],FAMILIES[0],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[3],FAMILIES[0],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_ONE[3],FAMILIES[1],QUALIFIERS_ONE[0],VALUES[0]),new KeyValue(ROWS_ONE[3],FAMILIES[1],QUALIFIERS_ONE[3],VALUES[0]),new KeyValue(ROWS_TWO[0],FAMILIES[0],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[0],FAMILIES[0],QUALIFIERS_TWO[3],VALUES[1]),new KeyValue(ROWS_TWO[0],FAMILIES[1],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[0],FAMILIES[1],QUALIFIERS_TWO[3],VALUES[1]),new KeyValue(ROWS_TWO[2],FAMILIES[0],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[2],FAMILIES[0],QUALIFIERS_TWO[3],VALUES[1]),new KeyValue(ROWS_TWO[2],FAMILIES[1],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[2],FAMILIES[1],QUALIFIERS_TWO[3],VALUES[1]),new KeyValue(ROWS_TWO[3],FAMILIES[0],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[3],FAMILIES[0],QUALIFIERS_TWO[3],VALUES[1]),new KeyValue(ROWS_TWO[3],FAMILIES[1],QUALIFIERS_TWO[0],VALUES[1]),new KeyValue(ROWS_TWO[3],FAMILIES[1],QUALIFIERS_TWO[3],VALUES[1])};
  verifyScanFull(s,kvs);
}
