### Question:
HttpUtils { public static String get(String url) { CloseableHttpClient httpclient = HttpUtils.getInstance(); HttpGet httpget = new HttpGet(url); return getResponseContentString(httpget, httpclient); } private  HttpUtils(); static CloseableHttpClient getInstance(); static String get(String url); static String getResponseContentString(HttpGet httpget, CloseableHttpClient httpClient); static final Logger logger; }### Answer:
@Test public void testGetTest() { String result = HttpUtils.get("https: Assert.assertNotNull(result); ObjectNode jsonObject = JSONUtils.parseObject(result); Assert.assertEquals("GitHub", jsonObject.path("name").asText()); result = HttpUtils.get("https: Assert.assertNull(result); }
@Test public void testGetByKerberos() { try { String applicationUrl = hadoopUtils.getApplicationUrl("application_1542010131334_0029"); String responseContent; responseContent = HttpUtils.get(applicationUrl); Assert.assertNull(responseContent); } catch (Exception e) { logger.error(e.getMessage(), e); } }