### Question:
ShardIndexKeyFunctor implements KeyFunctor { static boolean isKeyInBloomFilter(org.apache.accumulo.core.data.Key cbKey) { return (cbKey.getRowData().length() > 0 && cbKey.getColumnFamilyData().length() > 0); }  @Override org.apache.hadoop.util.bloom.Key transform(org.apache.accumulo.core.data.Key cbKey); @Override org.apache.hadoop.util.bloom.Key transform(Range range);  }### Answer:
@Test public void testIsKeyInBloomFilter() { org.apache.accumulo.core.data.Key cbKey = new org.apache.accumulo.core.data.Key(); Assert.assertFalse("empty key should not be in bloom filter", ShardIndexKeyFunctor.isKeyInBloomFilter(cbKey)); cbKey = new org.apache.accumulo.core.data.Key("row only"); Assert.assertFalse("row only key should not be in bloom filter", ShardIndexKeyFunctor.isKeyInBloomFilter(cbKey)); cbKey = new org.apache.accumulo.core.data.Key("", "cf only"); Assert.assertFalse("cf only key should not be in bloom filter", ShardIndexKeyFunctor.isKeyInBloomFilter(cbKey)); cbKey = new org.apache.accumulo.core.data.Key("", "", "cq only"); Assert.assertFalse("cq only key should not be in bloom filter", ShardIndexKeyFunctor.isKeyInBloomFilter(cbKey)); cbKey = new org.apache.accumulo.core.data.Key("row", "", "and cq"); Assert.assertFalse("row and cq only key should not be in bloom filter", ShardIndexKeyFunctor.isKeyInBloomFilter(cbKey)); cbKey = new org.apache.accumulo.core.data.Key("row", "and cf"); Assert.assertTrue("row and cf only key should be in bloom filter", ShardIndexKeyFunctor.isKeyInBloomFilter(cbKey)); }