@Test
  public void testPromptPasswordWithHiveConf() throws Exception {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("-n");
    argList.add("hive");
    argList.add("-p");
    argList.add("--hiveconf");
    argList.add("hive.cli.print.header=true");
    argList.add("-e");
    argList.add("show tables;");
    String output = connectWithPromptAndVerify(argList, "hivepassword", false, null,
        "hive.cli.print.header", "true");
    Assert.assertTrue("Table name " + tableName + " not found in the output",
        output.contains(tableName.toLowerCase()));
  }
Tests if beeline prompts for a password and also confirms that --hiveconf
argument works when given immediately after -p with no password
@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeelinePasswordOption.java