@Test
  public void testRetrieveGcr()
      throws IOException, CredentialHelperUnhandledServerUrlException,
          CredentialHelperNotFoundException, URISyntaxException, InterruptedException {
    new Command(GCR_CREDENTIAL_HELPER, "store")
        .run(Files.readAllBytes(Paths.get(Resources.getResource("credentials.json").toURI())));

    DockerCredentialHelper dockerCredentialHelper =
        new DockerCredentialHelper("myregistry", Paths.get(GCR_CREDENTIAL_HELPER));

    Credential credentials = dockerCredentialHelper.retrieve();
    Assert.assertEquals("myusername", credentials.getUsername());
    Assert.assertEquals("mysecret", credentials.getPassword());
  }
Tests retrieval via {@code docker-credential-gcr} CLI.
jib-core/src/integration-test/java/com/google/cloud/tools/jib/registry/credentials/DockerCredentialHelperIntegrationTest.java