private JiraConfiguration getJiraConfig(FormData formData) {
    for (JiraConfiguration config : getValidJiraConfigs()) {
      if (config.getName().equals(formData.getJiraConfigName())) {
        return config;
      }
    }

    throw new IllegalArgumentException("The JIRA config doesn't exist");
  }
  private JiraConfiguration getJiraConfig(String name) {
    for (JiraConfiguration config : getValidJiraConfigs()) {
      if (config.getName().equals(name)) {
        return config;
      }
    }

    throw new IllegalArgumentException("No such config was found.");
  }
 private JiraSession getJiraSession(JiraConfiguration config) {
   return new JiraSession(config.getJiraUrl(), config.getUsername(), config.getPassword());
 }