@Test
  public void testTableNameClash() throws Exception {
    final String name = this.name.getMethodName();
    TableDescriptor tableDescriptor1 =
      TableDescriptorBuilder.newBuilder(TableName.valueOf(name + "SOMEUPPERCASE"))
        .setColumnFamily(ColumnFamilyDescriptorBuilder.of(HConstants.CATALOG_FAMILY)).build();
    TableDescriptor tableDescriptor2 = TableDescriptorBuilder.newBuilder(TableName.valueOf(name))
      .setColumnFamily(ColumnFamilyDescriptorBuilder.of(HConstants.CATALOG_FAMILY)).build();
    ADMIN.createTable(tableDescriptor1);
    ADMIN.createTable(tableDescriptor2);
    // Before fix, below would fail throwing a NoServerForRegionException.
    TEST_UTIL.getConnection().getTable(tableDescriptor2.getTableName()).close();
  }
Test for hadoop-1581 'HBASE: Unopenable tablename bug'.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java