### Question:
LinkageCheckerArguments { static LinkageCheckerArguments readCommandLine(String... arguments) throws ParseException { CommandLineParser parser = new DefaultParser(); try { CommandLine commandLine = parser.parse(options, arguments); return new LinkageCheckerArguments(commandLine); } catch (IllegalArgumentException ex) { throw new ParseException("Invalid URL syntax in Maven repository URL" + ex.getMessage()); } } private  LinkageCheckerArguments(CommandLine commandLine);   }### Answer:
@Test public void parseCommandLineArguments_duplicates() { try { LinkageCheckerArguments.readCommandLine( "--artifacts", "abc.com:abc:1.1,abc.com:abc-util:1.2", "-b", "abc.com:dummy:1.2"); Assert.fail(); } catch (ParseException ex) { Assert.assertEquals( "The option 'b' was specified but an option from this group has already been" + " selected: 'a'", ex.getMessage()); } }
@Test public void parseCommandLineArguments_invalidOption() { try { LinkageCheckerArguments.readCommandLine("-x"); Assert.fail(); } catch (ParseException ex) { Assert.assertEquals("Unrecognized option: -x", ex.getMessage()); } }