@Override
    boolean dispatch(String command) {
      String connectCommand = "!connect";
      String propertyCommand = "!properties";
      if (command.startsWith(connectCommand)) {
        this.connectArgs = command.substring(connectCommand.length() + 1, command.length());
      } else if (command.startsWith(propertyCommand)) {
        this.properties.add(command.substring(propertyCommand.length() + 1, command.length()));
      } else {
        this.queries.add(command);
      }
      return true;
    }
Unit test for Beeline arg parser.
beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java