@Test
  public void testPull_ociIndex() throws IOException, RegistryException {
    RegistryClient registryClient =
        RegistryClient.factory(EventHandlers.NONE, "gcr.io", "distroless/base", httpClient)
            .newRegistryClient();

    // Ensures call to image at the specified SHA returns an OCI index
    OciIndexTemplate manifestListTargeted =
        registryClient.pullManifest(KNOWN_OCI_INDEX_SHA, OciIndexTemplate.class).getManifest();
    assertThat(manifestListTargeted.getSchemaVersion()).isEqualTo(2);
    assertThat((manifestListTargeted.getManifests().size() > 0)).isTrue();

    // Generic call to image at the specified SHA, should also return an OCI index
    ManifestTemplate manifestListGeneric =
        registryClient.pullManifest(KNOWN_OCI_INDEX_SHA).getManifest();
    assertThat(manifestListGeneric.getSchemaVersion()).isEqualTo(2);
    assertThat(manifestListGeneric).isInstanceOf(OciIndexTemplate.class);
    assertThat(((OciIndexTemplate) manifestListGeneric).getManifests()).isNotEmpty();
  }
A known oci manifest sha for gcr.io/distroless/base.
jib-core/src/integration-test/java/com/google/cloud/tools/jib/registry/ManifestPullerIntegrationTest.java