@Test
  public void testCall_noHttpResponse() throws IOException, RegistryException {
    NoHttpResponseException mockNoResponseException = Mockito.mock(NoHttpResponseException.class);
    setUpRegistryResponse(mockNoResponseException);

    try {
      endpointCaller.call();
      Assert.fail("Call should have failed");

    } catch (NoHttpResponseException ex) {
      Assert.assertSame(mockNoResponseException, ex);
    }
  }
Implementation of {@link RegistryEndpointProvider} for testing.
jib-core/src/test/java/com/google/cloud/tools/jib/registry/RegistryEndpointCallerTest.java