@Before
  public void setUp() throws IOException {
    endpointCaller =
        new RegistryEndpointCaller<>(
            mockEventHandlers,
            "userAgent",
            new TestRegistryEndpointProvider(),
            Authorization.fromBasicCredentials("user", "pass"),
            new RegistryEndpointRequestProperties("serverUrl", "imageName"),
            mockHttpClient);

    Mockito.when(mockResponse.getBody())
        .thenReturn(new ByteArrayInputStream("body".getBytes(StandardCharsets.UTF_8)));
  }
Implementation of {@link RegistryEndpointProvider} for testing.
jib-core/src/test/java/com/google/cloud/tools/jib/registry/RegistryEndpointCallerTest.java