public CredentialRetriever dockerCredentialHelper(String credentialHelper) {
    return dockerCredentialHelper(Paths.get(credentialHelper));
  }
@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"), Collections.emptyMap());
    Mockito.verify(mockLogger)
        .accept(
            LogEvent.lifecycle("Using credential helper docker-credential-foo for registry/repo"));
  }