Skip to content

Commit

Permalink
polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sanzmauro committed Nov 2, 2023
1 parent 92d2cbe commit ba4bee1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,15 @@
import org.apache.hc.client5.http.classic.methods.HttpGet;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
import org.apache.hc.core5.http.HttpException;
import org.apache.hc.core5.http.HttpHeaders;
import org.apache.hc.core5.http.HttpStatus;
import org.apache.hc.core5.http.Header;
import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.apache.hc.core5.http.message.BasicHeader;
import org.apache.hc.core5.net.URIBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;

import static com.google.common.base.Preconditions.checkNotNull;

Expand Down
5 changes: 0 additions & 5 deletions client/src/main/java/io/split/engine/common/FetchOptions.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
package io.split.engine.common;

import org.apache.hc.core5.http.Header;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;

public class FetchOptions {

Expand Down
7 changes: 1 addition & 6 deletions client/src/test/java/io/split/TestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.http.Header;
import org.apache.hc.core5.http.HttpEntity;
import org.apache.hc.core5.http.HttpHeaders;
import org.apache.hc.core5.http.message.BasicHeader;
import org.mockito.Mockito;

import java.io.IOException;
Expand All @@ -21,10 +19,7 @@ public static CloseableHttpClient mockHttpClient(String jsonName, int httpStatus
ClassicHttpResponse httpResponseMock = Mockito.mock(ClassicHttpResponse.class);
Mockito.when(httpResponseMock.getEntity()).thenReturn(entityMock);
Mockito.when(httpResponseMock.getCode()).thenReturn(httpStatus);
Header[] headers = new Header[2];
headers[0] = new BasicHeader(HttpHeaders.VIA, "HTTP/1.1 m_proxy_rio1");
headers[1] = new BasicHeader(HttpHeaders.VIA, "HTTP/1.1 s_proxy_rio1");
Mockito.when(httpResponseMock.getHeaders()).thenReturn(headers);
Mockito.when(httpResponseMock.getHeaders()).thenReturn(new Header[0]);
CloseableHttpClient httpClientMock = Mockito.mock(CloseableHttpClient.class);
Mockito.when(httpClientMock.execute(Mockito.anyObject())).thenReturn(classicResponseToCloseableMock(httpResponseMock));

Expand Down

0 comments on commit ba4bee1

Please sign in to comment.