### Question:
AbstractPrefixMatchingExtractor implements ByteArrayExtractor { @Override public boolean isApplicable(KeyValue keyValue) { return CellUtil.matchingFamily(keyValue, columnFamily) && Bytes.startsWith(CellUtil.cloneQualifier(keyValue), prefix); } AbstractPrefixMatchingExtractor(byte[] columnFamily, byte[] prefix); @Override Collection<byte[]> extract(Result result); @Override boolean isApplicable(KeyValue keyValue); @Override byte[] getColumnFamily(); @Override byte[] getColumnQualifier(); @Override boolean containsTarget(Result result);  }### Answer:
@Test public void testIsApplicable_ExactMatch() { assertTrue(extractor.isApplicable(new KeyValue(ROW, COLFAM, Bytes.toBytes("AB"), Bytes.toBytes("value")))); }
@Test public void testIsApplicable_WrongColumnFamily() { assertFalse(extractor.isApplicable(new KeyValue(ROW, Bytes.toBytes("wrong family"), Bytes.toBytes("AB"), Bytes.toBytes("value")))); }
@Test public void testIsApplicable_PrefixMatch() { assertTrue(extractor.isApplicable(new KeyValue(ROW, COLFAM, Bytes.toBytes("ABC"), Bytes.toBytes("value")))); }
@Test public void testIsApplicable_NotMatch() { assertFalse(extractor.isApplicable(new KeyValue(ROW, COLFAM, Bytes.toBytes("no match"), Bytes.toBytes("value")))); }