@Test
  public void testPromptPasswordOptionLast() throws Exception {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("-n");
    argList.add("hive");
    argList.add("-p");
    connectBeelineWithUserPrompt(argList, "hivepassword");
  }
Test if beeline prompts for a password when optional password option is at the end of arguments
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeelinePasswordOption.java