@Test(expected = IOException.class)
  public void testAddCoprocessorTwice() throws IOException {
    String cpName = "a.b.c.d";
    TableDescriptorBuilder.newBuilder(TableName.META_TABLE_NAME).setCoprocessor(cpName)
      .setCoprocessor(cpName).build();
  }
Test setting values in the descriptor.
hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestTableDescriptorBuilder.java