@Test
public void fuzzyKeysAreTranslatedToRegularExpressions() throws IOException {

  List<Pair<byte[], byte[]>> testPairs =
      ImmutableList.<Pair<byte[], byte[]>>builder()
          .add(new Pair<>(Bytes.toBytes("abcd"), new byte[] {-1, -1, -1, -1}))
          .add(new Pair<>(Bytes.toBytes(".fgh"), new byte[] {0, 0, 1, 0}))
          .add(new Pair<>(Bytes.toBytes("ijkl"), new byte[] {1, 1, 1, 1}))
          .build();
  FuzzyRowFilter filter = new FuzzyRowFilter(testPairs);
  Filters.Filter adaptedFilter = adapter.adapt(context, filter);
  Filters.Filter expected =
      FILTERS
          .interleave()
          .filter(FILTERS.key().regex("abcd\\C*"))
          .filter(FILTERS.key().regex("\\.f\\Ch\\C*"))
          .filter(FILTERS.key().regex("\\C\\C\\C\\C\\C*"));
  Assert.assertEquals(expected.toProto(), adaptedFilter.toProto());
}