@Test
public void testDoGet() throws IOException {

    CloseableHttpClient httpClient = Mockito.mock(CloseableHttpClient.class);
    CloseableHttpResponse httpResponse = Mockito.mock(CloseableHttpResponse.class);
    HttpEntity entity = Mockito.mock(HttpEntity.class);
    String data = "Sample Server Response";
    Mockito.when(httpResponse.getStatusLine()).thenReturn(new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK" ));
    Mockito.when(entity.getContent()).thenReturn(new ByteArrayInputStream(data.getBytes()));
    Mockito.when(httpResponse.getEntity()).thenReturn(entity);
    Mockito.when(httpClient.execute(Mockito.any(HttpGet.class))).thenReturn(httpResponse);
    HttpDriver httpDriver = new HttpDriver.Builder("", null, "asdf".toCharArray(), null, null)
            .build();
    httpDriver.setHttpClient(httpClient);
    String url = "https://localhost:4443/sample.html";
    String out = httpDriver.doGet(url);
    Assert.assertEquals(out, data);
}