RetryCommand extends Command { int getIndexOfHelpParameter() { int indexOf = originalArgs.indexOf(HELP_SHORT); if (indexOf == -1) { indexOf = originalArgs.indexOf(HELP_LONG); } return indexOf; }  @Override void execute(); @Override boolean shouldShowUsage();  }
@Test public void getIndexOfHelpParameter() { retryCommandSpy.originalArgs = Arrays.asList("retry", "-h"); assertEquals(1, retryCommandSpy.getIndexOfHelpParameter()); }