// Path: src/test/java/com/github/sbouclier/mock/MockHttpsURLConnection.java
// public class MockHttpsURLConnection extends HttpsURLConnection {
//     public MockHttpsURLConnection(URL url) {
//         super(url);
//     }
// 
//     @Override
//     public String getCipherSuite() {
//         return null;
//     }
// 
//     @Override
//     public Certificate[] getLocalCertificates() {
//         return new Certificate[0];
//     }
// 
//     @Override
//     public Certificate[] getServerCertificates() throws SSLPeerUnverifiedException {
//         return new Certificate[0];
//     }
// 
//     @Override
//     public void disconnect() {
// 
//     }
// 
//     @Override
//     public boolean usingProxy() {
//         return false;
//     }
// 
//     @Override
//     public void connect() throws IOException {
// 
//     }
// 
//     @Override
//     public OutputStream getOutputStream() throws IOException {
//         return new OutputStream() {
//             @Override
//             public void write(int b) throws IOException {
// 
//             }
//         };
//     }
// 
//     @Override
//     public InputStream getInputStream() throws IOException {
//         return new ByteArrayInputStream("read inputstream".getBytes("UTF-8"));
//     }
// }


import com.github.sbouclier.mock.MockHttpsURLConnection;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.Mockito;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
import java.util.HashMap;
import java.util.Map;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.mockito.ArgumentMatchers.any;

        // When
        String result = client.executePrivateQuery("https://baseUrl", "/urlMethod");

        // Then exception
    }

    @Test
    public void should_retrieve_private_json_response() throws IOException, KrakenApiException {

        // Given
        URL url = null;
        final MockHttpsURLConnection mockHttpURLConnection = new MockHttpsURLConnection(url);

        final URLStreamHandler handler = new URLStreamHandler() {
            @Override
            protected URLConnection openConnection(final URL arg0)
                    throws IOException {
                return mockHttpURLConnection;
            }
        };

        url = new URL("https", "baseUrl", 80, "", handler);

        HttpJsonClient client = new HttpJsonClient();

        // When
        String result = client.getPrivateJsonResponse(url, "postData", "signature");

        // Then
// Path: src/test/java/com/github/sbouclier/mock/MockHttpsURLConnection.java
// public class MockHttpsURLConnection extends HttpsURLConnection {
//     public MockHttpsURLConnection(URL url) {
//         super(url);
//     }
// 
//     @Override
//     public String getCipherSuite() {
//         return null;
//     }
// 
//     @Override
//     public Certificate[] getLocalCertificates() {
//         return new Certificate[0];
//     }
// 
//     @Override
//     public Certificate[] getServerCertificates() throws SSLPeerUnverifiedException {
//         return new Certificate[0];
//     }
// 
//     @Override
//     public void disconnect() {
// 
//     }
// 
//     @Override
//     public boolean usingProxy() {
//         return false;
//     }
// 
//     @Override
//     public void connect() throws IOException {
// 
//     }
// 
//     @Override
//     public OutputStream getOutputStream() throws IOException {
//         return new OutputStream() {
//             @Override
//             public void write(int b) throws IOException {
// 
//             }
//         };
//     }
// 
//     @Override
//     public InputStream getInputStream() throws IOException {
//         return new ByteArrayInputStream("read inputstream".getBytes("UTF-8"));
//     }
// }


// Path: src/test/java/com/github/sbouclier/HttpJsonClientTest.java
import com.github.sbouclier.mock.MockHttpsURLConnection;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.Mockito;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
import java.util.HashMap;
import java.util.Map;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.mockito.ArgumentMatchers.any;


        // When
        String result = client.executePrivateQuery("https://baseUrl", "/urlMethod");

        // Then exception
    }

    @Test
    public void should_retrieve_private_json_response() throws IOException, KrakenApiException {

        // Given
        URL url = null;
        final MockHttpsURLConnection mockHttpURLConnection = new MockHttpsURLConnection(url);

        final URLStreamHandler handler = new URLStreamHandler() {
            @Override
            protected URLConnection openConnection(final URL arg0)
                    throws IOException {
                return mockHttpURLConnection;
            }
        };

        url = new URL("https", "baseUrl", 80, "", handler);

        HttpJsonClient client = new HttpJsonClient();

        // When
        String result = client.getPrivateJsonResponse(url, "postData", "signature");

        // Then
        assertThat(result, equalTo("read inputstream"));