public static List<CredentialRetriever> getFromCredentialRetrievers(
      CommonCliOptions commonCliOptions, DefaultCredentialRetrievers defaultCredentialRetrievers)
      throws FileNotFoundException {
    // these are all mutually exclusive as enforced by the CLI

    commonCliOptions
        .getUsernamePassword()
        .ifPresent(
            credential ->
                defaultCredentialRetrievers.setKnownCredential(
                    credential, "--username/--password"));
    commonCliOptions
        .getFromUsernamePassword()
        .ifPresent(
            credential ->
                defaultCredentialRetrievers.setKnownCredential(
                    credential, "--from-username/--from-password"));
    commonCliOptions
        .getCredentialHelper()
        .ifPresent(defaultCredentialRetrievers::setCredentialHelper);
    commonCliOptions
        .getFromCredentialHelper()
        .ifPresent(defaultCredentialRetrievers::setCredentialHelper);

    return defaultCredentialRetrievers.asList();
  }
@Test
  @Parameters(method = "paramsFromNone")
  public void testGetFromCredentialRetriever_none(String[] args) throws FileNotFoundException {
    CommonCliOptions commonCliOptions =
        CommandLine.populateCommand(new CommonCliOptions(), ArrayUtils.addAll(DEFAULT_ARGS, args));
    Credentials.getFromCredentialRetrievers(commonCliOptions, defaultCredentialRetrievers);
    verify(defaultCredentialRetrievers).asList();
    verifyNoMoreInteractions(defaultCredentialRetrievers);
  }