public static List<CredentialRetriever> getToCredentialRetrievers(
      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
        .getToUsernamePassword()
        .ifPresent(
            credential ->
                defaultCredentialRetrievers.setKnownCredential(
                    credential, "--to-username/--to-password"));
    commonCliOptions
        .getCredentialHelper()
        .ifPresent(defaultCredentialRetrievers::setCredentialHelper);
    commonCliOptions
        .getToCredentialHelper()
        .ifPresent(defaultCredentialRetrievers::setCredentialHelper);

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