public void verifyInvocationResults(Integer[] selectQualifiers, Integer[] expectedQualifiers)
    throws Exception {
    Get get = new Get(ROW_BYTES);
    for (int i = 0; i < selectQualifiers.length; i++) {
      get.addColumn(FAMILY_NAME_BYTES, Bytes.toBytes(QUALIFIER_PREFIX + selectQualifiers[i]));
    }

    get.setFilter(new InvocationRecordFilter());

    List<KeyValue> expectedValues = new ArrayList<>();
    for (int i = 0; i < expectedQualifiers.length; i++) {
      expectedValues.add(new KeyValue(ROW_BYTES, FAMILY_NAME_BYTES,
        Bytes.toBytes(QUALIFIER_PREFIX + expectedQualifiers[i]), expectedQualifiers[i],
        Bytes.toBytes(VALUE_PREFIX + expectedQualifiers[i])));
    }

    Scan scan = new Scan(get);
    List<Cell> actualValues = new ArrayList<>();
    List<Cell> temp = new ArrayList<>();
    InternalScanner scanner = this.region.getScanner(scan);
    while (scanner.next(temp)) {
      actualValues.addAll(temp);
      temp.clear();
    }
    actualValues.addAll(temp);
    Assert.assertTrue(
      "Actual values " + actualValues + " differ from the expected values:" + expectedValues,
      expectedValues.equals(actualValues));
  }
Test the invocation logic of the filters. A filter must be invoked only for the columns that are
requested for.
hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestInvocationRecordFilter.java