@Test(expected = IllegalArgumentException.class) public void testWrongArguments() { ReferenceListHandler handler = getReferenceListHandler(); ApplicationOptions applicationOptions = new ApplicationOptions(); applicationOptions.setPrintTable(true); handler.parseAndVerifyArguments(Collections.singletonList("test"), applicationOptions); }
@Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (!arguments.isEmpty()) { throw new IllegalArgumentException(MessageConstants.getMessage( ILLEGAL_COMMAND_ARGUMENTS, getCommand(), 0, arguments.size())); } this.printTable = options.isPrintTable(); }
ReferenceListHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (!arguments.isEmpty()) { throw new IllegalArgumentException(MessageConstants.getMessage( ILLEGAL_COMMAND_ARGUMENTS, getCommand(), 0, arguments.size())); } this.printTable = options.isPrintTable(); } }
ReferenceListHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (!arguments.isEmpty()) { throw new IllegalArgumentException(MessageConstants.getMessage( ILLEGAL_COMMAND_ARGUMENTS, getCommand(), 0, arguments.size())); } this.printTable = options.isPrintTable(); }  }
ReferenceListHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (!arguments.isEmpty()) { throw new IllegalArgumentException(MessageConstants.getMessage( ILLEGAL_COMMAND_ARGUMENTS, getCommand(), 0, arguments.size())); } this.printTable = options.isPrintTable(); }  @Override void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options); @Override int runCommand(); }
ReferenceListHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (!arguments.isEmpty()) { throw new IllegalArgumentException(MessageConstants.getMessage( ILLEGAL_COMMAND_ARGUMENTS, getCommand(), 0, arguments.size())); } this.printTable = options.isPrintTable(); }  @Override void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options); @Override int runCommand();  }