@Test
  public void testBeelineShellCommandWithoutConn() throws Throwable {
    List<String> argList = new ArrayList<>();
    final String SCRIPT_TEXT = "!sh echo hello world";
    final String EXPECTED_PATTERN = "hello world";
    testScriptFile(SCRIPT_TEXT, argList, OutStream.OUT,
        Collections.singletonList(new Tuple<>(EXPECTED_PATTERN, true)),
        Collections.singletonList(Modes.SCRIPT));
  }
Attempt to execute a simple script file with the usage of user & password variables in URL.
Test for presence of an expected pattern
in the output (stdout or stderr), fail if not found
Print PASSED or FAILED
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java