String[] argv = { "-master", "master", "-slave", "slave" };
new JCommander(new Object[] { m , s }, argv);
}
public void arityString() {
ArgsArityString args = new ArgsArityString();
String[] argv = { "-pairs", "pair0", "pair1", "rest" };
new JCommander(args, argv);
Assert.assertEquals(args.pairs.size(), 2);
Assert.assertEquals(args.pairs.get(0), "pair0");