private static ResponseException mockResponseException(int statusCode) {
    ResponseException mock = Mockito.mock(ResponseException.class);
    Mockito.when(mock.getStatusCode()).thenReturn(statusCode);
    return mock;
  }
Implementation of {@link RegistryEndpointProvider} for testing.
jib-core/src/test/java/com/google/cloud/tools/jib/registry/RegistryEndpointCallerTest.java