@Test
public void testPrefixAddedAsRowRegex() throws IOException {

  PrefixFilterAdapter adapter = new PrefixFilterAdapter();
  String prefix = "Foobar";
  PrefixFilter filter = new PrefixFilter(Bytes.toBytes(prefix));
  Scan emptyScan = new Scan();
  FilterAdapterContext context = new FilterAdapterContext(emptyScan, null);
  byte[] prefixRegex = Bytes.toBytes(prefix + "\\C*");
  Assert.assertEquals(
      FILTERS.key().regex(ByteString.copyFrom(prefixRegex)).toProto(),
      adapter.adapt(context, filter).toProto());
}