@Test
  public void testRetrieve_nonexistentCredentialHelper()
      throws IOException, CredentialHelperUnhandledServerUrlException {
    try {
      DockerCredentialHelper fakeDockerCredentialHelper =
          new DockerCredentialHelper("", Paths.get("non-existing-helper"));

      fakeDockerCredentialHelper.retrieve();

      Assert.fail("Retrieve should have failed for nonexistent credential helper");

    } catch (CredentialHelperNotFoundException ex) {
      Assert.assertEquals("The system does not have non-existing-helper CLI", ex.getMessage());
    }
  }
Tests retrieval via {@code docker-credential-gcr} CLI.
jib-core/src/integration-test/java/com/google/cloud/tools/jib/registry/credentials/DockerCredentialHelperIntegrationTest.java