@Test
  public void testIsBrokenPipe_terminatesWhenCauseIsOriginal() {
    IOException exception = Mockito.mock(IOException.class);
    Mockito.when(exception.getCause()).thenReturn(exception);

    Assert.assertFalse(RegistryEndpointCaller.isBrokenPipe(exception));
  }
Implementation of {@link RegistryEndpointProvider} for testing.
jib-core/src/test/java/com/google/cloud/tools/jib/registry/RegistryEndpointCallerTest.java