@Test
  public void testCall_logNullExceptionMessage() throws IOException, RegistryException {
    setUpRegistryResponse(new IOException());

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

    } catch (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    (null exception message)\u001B[0m"));
      Mockito.verifyNoMoreInteractions(mockEventHandlers);
    }
  }
Implementation of {@link RegistryEndpointProvider} for testing.
jib-core/src/test/java/com/google/cloud/tools/jib/registry/RegistryEndpointCallerTest.java