@Test
  public void testDuplicateArgs() throws Exception {
    TestBeeline bl = new TestBeeline();
    String args[] = new String[] {"-u", "url", "-u", "url2", "-n", "name",
      "-p", "password", "-d", "driver"};
    Assert.assertEquals(0, bl.initArgs(args));
    Assert.assertTrue(bl.connectArgs.equals("url name password driver"));
  }
The first flag is taken by the parser.
beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java