private void initFromFile() {
    tmp = generateTmpFile(CMD);
    if (tmp == null) {
      Assert.fail("Fail to create the initial file");
    }
    executeCMD(new String[] { "-f", "\"" + tmp.getAbsolutePath() + "\"" }, null, 0);
  }
This method is used for verifying CMD to see whether the output contains the keywords provided.
beeline/src/test/org/apache/hive/beeline/cli/TestHiveCli.java