@Test
  public void testBypassAlsoCompletes() throws IOException {
    // ensure that server time increments every time we do an operation, otherwise
    // previous deletes will eclipse successive puts having the same timestamp
    EnvironmentEdgeManagerTestHelper.injectEdge(new IncrementingEnvironmentEdge());

    Table t = util.getConnection().getTable(tableName);
    List<Put> puts = new ArrayList<>();
    Put p = new Put(row1);
    p.addColumn(dummy, dummy, dummy);
    puts.add(p);
    p = new Put(row2);
    p.addColumn(test, dummy, dummy);
    puts.add(p);
    p = new Put(row3);
    p.addColumn(test, dummy, dummy);
    puts.add(p);
    t.put(puts);
    // Ensure expected result.
    checkRowAndDelete(t, row1, 1);
    checkRowAndDelete(t, row2, 0);
    checkRowAndDelete(t, row3, 0);
    // We have three Coprocessors stacked up on the prePut. See the beforeClass setup. We did three
    // puts above two of which bypassed. A bypass means do not call the other coprocessors in the
    // stack so for the two 'test' calls in the above, we should not have call through to all all
    // three coprocessors in the chain. So we should have:
    // 3 invocations for first put + 1 invocation + 1 bypass for second put + 1 invocation +
    // 1 bypass for the last put. Assert.
    assertEquals("Total CP invocation count", 5, TestCoprocessor.PREPUT_INVOCATIONS.get());
    assertEquals("Total CP bypasses", 2, TestCoprocessor.PREPUT_BYPASSES.get());
  }
Test that when bypass is called, we skip out calling any other coprocessors stacked up method,
in this case, a prePut. If the column family is 'test', then bypass is invoked.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverBypass.java