@Test
  public void testFilterInvocation() throws Exception {
    List<Integer> selectQualifiers = new ArrayList<>();
    List<Integer> expectedQualifiers = new ArrayList<>();

    selectQualifiers.add(-1);
    verifyInvocationResults(selectQualifiers.toArray(new Integer[selectQualifiers.size()]),
      expectedQualifiers.toArray(new Integer[expectedQualifiers.size()]));

    selectQualifiers.clear();

    selectQualifiers.add(0);
    expectedQualifiers.add(0);
    verifyInvocationResults(selectQualifiers.toArray(new Integer[selectQualifiers.size()]),
      expectedQualifiers.toArray(new Integer[expectedQualifiers.size()]));

    selectQualifiers.add(3);
    verifyInvocationResults(selectQualifiers.toArray(new Integer[selectQualifiers.size()]),
      expectedQualifiers.toArray(new Integer[expectedQualifiers.size()]));

    selectQualifiers.add(4);
    expectedQualifiers.add(4);
    verifyInvocationResults(selectQualifiers.toArray(new Integer[selectQualifiers.size()]),
      expectedQualifiers.toArray(new Integer[expectedQualifiers.size()]));

    selectQualifiers.add(5);
    verifyInvocationResults(selectQualifiers.toArray(new Integer[selectQualifiers.size()]),
      expectedQualifiers.toArray(new Integer[expectedQualifiers.size()]));

    selectQualifiers.add(8);
    expectedQualifiers.add(8);
    verifyInvocationResults(selectQualifiers.toArray(new Integer[selectQualifiers.size()]),
      expectedQualifiers.toArray(new Integer[expectedQualifiers.size()]));
  }
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