@Test
  public void testValueFilter() throws IOException {
    String filterString = "ValueFilter(!=, 'substring:pre')";
    ValueFilter valueFilter = doTestFilter(filterString, ValueFilter.class);
    assertEquals(CompareOperator.NOT_EQUAL, valueFilter.getCompareOperator());
    assertTrue(valueFilter.getComparator() instanceof SubstringComparator);
    SubstringComparator substringComparator = (SubstringComparator) valueFilter.getComparator();
    assertEquals("pre", new String(substringComparator.getValue(), StandardCharsets.UTF_8));
  }
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