@Test
  public void testUpdateConstraint() throws Exception {
    TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(name.getTableName());
    Constraints.add(builder, CheckConfigurationConstraint.class, CheckWasRunConstraint.class);
    Constraints.setConfiguration(builder, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

    List<? extends Constraint> constraints =
      Constraints.getConstraints(builder.build(), this.getClass().getClassLoader());

    assertEquals(2, constraints.size());

    // check to make sure the order didn't change
    assertEquals(CheckConfigurationConstraint.class, constraints.get(0).getClass());
    assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
  }
Test that when we update a constraint the ordering is not modified.
hbase-server/src/test/java/org/apache/hadoop/hbase/constraint/TestConstraints.java