### Question:
CredentialRetrieverFactory { public CredentialRetriever dockerCredentialHelper(String credentialHelper) { return dockerCredentialHelper(Paths.get(credentialHelper)); } @VisibleForTesting  CredentialRetrieverFactory(
      ImageReference imageReference,
      Consumer<LogEvent> logger,
      DockerCredentialHelperFactory dockerCredentialHelperFactory,
      GoogleCredentialsProvider googleCredentialsProvider); static CredentialRetrieverFactory forImage(
      ImageReference imageReference, Consumer<LogEvent> logger); CredentialRetriever known(Credential credential, String credentialSource); CredentialRetriever dockerCredentialHelper(String credentialHelper); CredentialRetriever dockerCredentialHelper(Path credentialHelper); CredentialRetriever wellKnownCredentialHelpers(); CredentialRetriever dockerConfig(); CredentialRetriever dockerConfig(Path dockerConfigFile); CredentialRetriever legacyDockerConfig(Path dockerConfigFile); CredentialRetriever googleApplicationDefaultCredentials();  }### Answer:
@Test public void testDockerCredentialHelper() throws CredentialRetrievalException { CredentialRetrieverFactory credentialRetrieverFactory = createCredentialRetrieverFactory("registry", "repo"); Assert.assertEquals( Optional.of(FAKE_CREDENTIALS), credentialRetrieverFactory .dockerCredentialHelper(Paths.get("docker-credential-foo")) .retrieve()); Mockito.verify(mockDockerCredentialHelperFactory) .create("registry", Paths.get("docker-credential-foo")); Mockito.verify(mockLogger) .accept( LogEvent.lifecycle("Using credential helper docker-credential-foo for registry/repo")); }