@Test
  public void testDisableConstraint() throws Exception {
    // create the table
    TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
    // add a family to the table
    for (byte[] family : new byte[][] { dummy, test }) {
      builder.setColumnFamily(ColumnFamilyDescriptorBuilder.of(family));
    }
    // add a constraint to make sure it others get run
    Constraints.add(builder, CheckWasRunConstraint.class);

    // Add Constraint to check
    Constraints.add(builder, AllFailConstraint.class);

    // and then disable the failing constraint
    Constraints.disableConstraint(builder, AllFailConstraint.class);

    util.getAdmin().createTable(builder.build());
    Table table = util.getConnection().getTable(tableName);
    try {
      // test that we don't fail because its disabled
      Put put = new Put(row1);
      byte[] qualifier = new byte[0];
      put.addColumn(dummy, qualifier, Bytes.toBytes("pass"));
      table.put(put);
    } finally {
      table.close();
    }
    assertTrue(CheckWasRunConstraint.wasRun);
  }
Check that if we just disable one constraint, then
hbase-server/src/test/java/org/apache/hadoop/hbase/constraint/TestConstraint.java