String[] argv = { "-long", "foo" };
new JCommander(args, argv);
}
public void listParameters() {
Args2 a = new Args2();
String[] argv = {"-log", "2", "-groups", "unit", "a", "b", "c", "-host", "host2"};
new JCommander(a, argv);
Assert.assertEquals(a.verbose.intValue(), 2);
Assert.assertEquals(a.groups, "unit");
Assert.assertEquals(a.hosts, Arrays.asList("host2"));