### Question:
JarHandlerUtils { public static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim() .replace("\"", "") .replace("\'", "")); } return tokens; }  static List<String> tokenizeArguments(@Nullable final String args);  }### Answer:
@Test public void testTokenizeNonQuoted() { final List<String> arguments = JarHandlerUtils.tokenizeArguments("--foo bar"); assertThat(arguments.get(0), equalTo("--foo")); assertThat(arguments.get(1), equalTo("bar")); }
@Test public void testTokenizeSingleQuoted() { final List<String> arguments = JarHandlerUtils.tokenizeArguments("--foo 'bar baz '"); assertThat(arguments.get(0), equalTo("--foo")); assertThat(arguments.get(1), equalTo("bar baz ")); }
@Test public void testTokenizeDoubleQuoted() { final List<String> arguments = JarHandlerUtils.tokenizeArguments("--name \"K. Bote \""); assertThat(arguments.get(0), equalTo("--name")); assertThat(arguments.get(1), equalTo("K. Bote ")); }