SetAuthsCommand extends CommandSupport { static List<String> parseAuths(List<String> args) { List<String> auths = new ArrayList<>(); for (String arg : args) { auths.addAll(parseAuths(arg)); } return auths; } SetAuthsCommand(Groovysh shell); @Override Object execute(List<String> args);  }
@Test public void testParseAuths() { List<String> args = new ArrayList<>(); args.add("\"a,b\",'c,d'"); args.add("e"); List<String> list = SetAuthsCommand.parseAuths(args); assertEquals(3, list.size()); assertEquals("a,b", list.get(0)); assertEquals("c,d", list.get(1)); assertEquals("e", list.get(2)); }