@Test
  public void testPromptPassOptionLastWithBeelineOpts() throws Exception {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("-n");
    argList.add("hive");
    argList.add("--force=true");
    argList.add("-e");
    argList.add("show tables;");
    argList.add("-p");
    String output = connectBeelineWithUserPrompt(argList, "hivepassword");
    Assert.assertTrue("Table name " + tableName + " not found in the output",
        output.contains(tableName.toLowerCase()));
  }
Tests if Beeline prompts for password when -p is the last argument and argList has CommandLine
options as well as BeelineOpts
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeelinePasswordOption.java