private static void assertRowCount(Table t, int expected) throws IOException {
    try (ResultScanner scanner = t.getScanner(new Scan())) {
      int i = 0;
      for (Result r : scanner) {
        LOG.info(r.toString());
        i++;
      }
      assertEquals(expected, i);
    }
  }
Tests that added mutations from coprocessors end up in the WAL.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverForAddingMutationsFromCoprocessors.java