@Test
  public void testEmptyHiveConfVariable() throws Exception {
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    PrintStream ops = new PrintStream(os);
    TestBeeline bl = new TestBeeline();
    bl.setOutputStream(ops);
    BeeLineOpts opts = new BeeLineOpts(bl, System.getProperties());
    String[] args = { "--hiveconf", "hadoop.tmp.dir=/tmp" };

    File rcFile = new File(opts.saveDir(), "beeline.properties");
    rcFile.deleteOnExit();

    BufferedWriter writer = new BufferedWriter(new FileWriter(rcFile));
    writer.write("beeline.hiveconfvariables={}");
    writer.newLine();
    writer.write("beeline.hivevariables={}");
    writer.newLine();
    writer.flush();

    try (InputStream stream = new FileInputStream(rcFile)) {
      bl.getOpts().load(stream);
      bl.initArgs(args);
      bl.getOpts().getHiveVariables().get("test");
    }
  }
Unit test for Beeline arg parser.
beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java