@Test
  public void testAdminFactory() throws IOException {
    Connection con1 = ConnectionFactory.createConnection(TEST_UTIL.getConfiguration());
    Admin admin = con1.getAdmin();
    assertTrue(admin.getConnection() == con1);
    assertTrue(admin.getConfiguration() == TEST_UTIL.getConfiguration());
    con1.close();
  }
Naive test to check that Connection#getAdmin returns a properly constructed HBaseAdmin object
@throws IOException Unable to construct admin
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestConnection.java