@Test
  public void testShowColumns() throws SQLException {
    Statement stmt = con.createStatement();
    assertNotNull("Statement is null", stmt);

    ResultSet res = stmt.executeQuery("show columns in " + tableName);
    res.next();
    assertEquals("Column name 'under_col' not found",
        "under_col", res.getString(1));

    res.next();
    assertEquals("Column name 'value' not found",
        "value", res.getString(1));
    assertFalse("More results found than expected", res.next());
  }
Validate the Metadata for the result set of a metadata getColumns call.
itests/hive-unit/src/test/java/org/apache/hive/jdbc/cbo_rp_TestJdbcDriver2.java