@Test
public void filterIfMissingIsApplied() throws IOException {

  String valueStr = "foobar";
  byte[] filterValue = Bytes.toBytes(valueStr);
  byte[] qualifier = Bytes.toBytes("someColumn");
  byte[] family = Bytes.toBytes("f");
  SingleColumnValueFilter filter =
      new SingleColumnValueFilter(
          family, qualifier, CompareFilter.CompareOp.EQUAL, new BinaryComparator(filterValue));
  filter.setFilterIfMissing(true);
  filter.setLatestVersionOnly(false);
  Filters.Filter adaptedFilter =
      UNDER_TEST.adapt(new FilterAdapterContext(new Scan(), null), filter);
  assertColumnSpecification(
      family, qualifier, false, adaptedFilter.toProto().getCondition().getPredicateFilter());
  Assert.assertEquals(
      createValueRangeFilter(valueStr),
      getValueRangeFilter(
          adaptedFilter.toProto().getCondition().getPredicateFilter().getChain()));
  Assert.assertEquals(
      FILTERS.pass().toProto(), adaptedFilter.toProto().getCondition().getTrueFilter());
}