@Test
  public void testFilterNotExistColumnFamilyEdits() {
    List<List<Entry>> entryList = new ArrayList<>();
    // should be filtered
    ExtendedCell c1 = new KeyValue(ROW, NON_EXISTING_FAMILY, QUALIFIER,
      EnvironmentEdgeManager.currentTime(), Type.Put, VALUE);
    Entry e1 = new Entry(new WALKeyImpl(new byte[32], TABLE1, EnvironmentEdgeManager.currentTime()),
      WALEditInternalHelper.addExtendedCell(new WALEdit(), c1));
    entryList.add(Lists.newArrayList(e1));
    // should be kept
    ExtendedCell c2 =
      new KeyValue(ROW, FAMILY, QUALIFIER, EnvironmentEdgeManager.currentTime(), Type.Put, VALUE);
    Entry e2 = new Entry(new WALKeyImpl(new byte[32], TABLE1, EnvironmentEdgeManager.currentTime()),
      WALEditInternalHelper.addExtendedCell(new WALEdit(), c2));
    entryList.add(Lists.newArrayList(e2, e1));
    List<List<Entry>> filtered = endpoint.filterNotExistColumnFamilyEdits(entryList);
    assertEquals(1, filtered.size());
    assertEquals(1, filtered.get(0).get(0).getEdit().getCells().size());
    Cell cell = filtered.get(0).get(0).getEdit().getCells().get(0);
    assertTrue(CellUtil.matchingFamily(cell, FAMILY));
  }
Tests {@link HBaseInterClusterReplicationEndpoint#filterNotExistColumnFamilyEdits(List)} and
{@link HBaseInterClusterReplicationEndpoint#filterNotExistTableEdits(List)}
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestHBaseInterClusterReplicationEndpointFilterEdits.java