@Test
  public void testNewRegistryErrorException_jsonErrorOutput() {
    ResponseException httpException = Mockito.mock(ResponseException.class);
    Mockito.when(httpException.getContent())
        .thenReturn(
            "{\"errors\": [{\"code\": \"MANIFEST_UNKNOWN\", \"message\": \"manifest unknown\"}]}");

    RegistryErrorException registryException =
        endpointCaller.newRegistryErrorException(httpException);
    Assert.assertSame(httpException, registryException.getCause());
    Assert.assertEquals(
        "Tried to actionDescription but failed because: manifest unknown",
        registryException.getMessage());
  }
Implementation of {@link RegistryEndpointProvider} for testing.
jib-core/src/test/java/com/google/cloud/tools/jib/registry/RegistryEndpointCallerTest.java