@Test
  public void testCompoundFilter1() throws IOException {
    String filterString = " (PrefixFilter ('realtime')AND  FirstKeyOnlyFilter())";
    FilterList filterList = doTestFilter(filterString, FilterList.class);
    ArrayList<Filter> filters = (ArrayList<Filter>) filterList.getFilters();

    assertTrue(filters.get(0) instanceof PrefixFilter);
    assertTrue(filters.get(1) instanceof FirstKeyOnlyFilter);
    PrefixFilter PrefixFilter = (PrefixFilter) filters.get(0);
    byte[] prefix = PrefixFilter.getPrefix();
    assertEquals("realtime", new String(prefix, StandardCharsets.UTF_8));
    FirstKeyOnlyFilter firstKeyOnlyFilter = (FirstKeyOnlyFilter) filters.get(1);
  }
This class tests ParseFilter.java It tests the entire work flow from when a string is given by
the user and how it is parsed to construct the corresponding Filter object
hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestParseFilter.java