@Test(expected = IllegalArgumentException.class) public void testWrongArguments() { ReferenceDeletionHandler handler = getReferenceDeletionHandler(); ApplicationOptions applicationOptions = new ApplicationOptions(); handler.parseAndVerifyArguments(Arrays.asList(PATH_TO_REFERENCE, REFERENCE_NAME), applicationOptions); }
@Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (arguments.isEmpty() || arguments.size() != 1) { throw new IllegalArgumentException(MessageConstants.getMessage(ILLEGAL_COMMAND_ARGUMENTS, getCommand(), 1, arguments.size())); } referenceId = loadReferenceId(arguments.get(0)); }
ReferenceDeletionHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (arguments.isEmpty() || arguments.size() != 1) { throw new IllegalArgumentException(MessageConstants.getMessage(ILLEGAL_COMMAND_ARGUMENTS, getCommand(), 1, arguments.size())); } referenceId = loadReferenceId(arguments.get(0)); } }
ReferenceDeletionHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (arguments.isEmpty() || arguments.size() != 1) { throw new IllegalArgumentException(MessageConstants.getMessage(ILLEGAL_COMMAND_ARGUMENTS, getCommand(), 1, arguments.size())); } referenceId = loadReferenceId(arguments.get(0)); }  }
ReferenceDeletionHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (arguments.isEmpty() || arguments.size() != 1) { throw new IllegalArgumentException(MessageConstants.getMessage(ILLEGAL_COMMAND_ARGUMENTS, getCommand(), 1, arguments.size())); } referenceId = loadReferenceId(arguments.get(0)); }  @Override void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options); @Override int runCommand(); }
ReferenceDeletionHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (arguments.isEmpty() || arguments.size() != 1) { throw new IllegalArgumentException(MessageConstants.getMessage(ILLEGAL_COMMAND_ARGUMENTS, getCommand(), 1, arguments.size())); } referenceId = loadReferenceId(arguments.get(0)); }  @Override void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options); @Override int runCommand();  }