T call() throws IOException, RegistryException {
    String apiRouteBase = "https://" + registryEndpointRequestProperties.getServerUrl() + "/v2/";
    URL initialRequestUrl = registryEndpointProvider.getApiRoute(apiRouteBase);
    return call(initialRequestUrl);
  }
@Test
  public void testCall_logErrorOnBrokenPipe() throws IOException, RegistryException {
    IOException ioException = new IOException("this is due to broken pipe");
    setUpRegistryResponse(ioException);

    try {
      endpointCaller.call();
      Assert.fail();

    } catch (IOException ex) {
      Assert.assertSame(ioException, ex);
      Mockito.verify(mockEventHandlers)
          .dispatch(
              LogEvent.error("\u001B[31;1mI/O error for image [serverUrl/imageName]:\u001B[0m"));
      Mockito.verify(mockEventHandlers)
          .dispatch(LogEvent.error("\u001B[31;1m    java.io.IOException\u001B[0m"));
      Mockito.verify(mockEventHandlers)
          .dispatch(LogEvent.error("\u001B[31;1m    this is due to broken pipe\u001B[0m"));
      Mockito.verify(mockEventHandlers)
          .dispatch(
              LogEvent.error(
                  "\u001B[31;1mbroken pipe: the server shut down the connection. Check the server "
                      + "log if possible. This could also be a proxy issue. For example, a proxy "
                      + "may prevent sending packets that are too large.\u001B[0m"));
      Mockito.verifyNoMoreInteractions(mockEventHandlers);
    }
  }