@Test public void getConfigurationsFromConfigApiTest() throws Exception { when(closeableHttpClient.execute((HttpGet) any())).thenReturn(httpResponse); assertThat(configurationDataProvider.getConfigurationsFromConfigApi("123",new HashMap<String, Object>()), is(nullValue())); }
public static JsonObject getConfigurationsFromConfigApi(String url,Map<String,Object> headers) { String resultStringPost = null; Gson gson = new Gson(); try { resultStringPost = httpGetMethodWithHeaders(url,headers); if (!StringUtils.isEmpty(resultStringPost)) { return gson.fromJson(resultStringPost, JsonObject.class); } } catch (Exception e) { LOGGER.error("Exceptions occured in getConfigurationsFromConfigApi========",e); return null; } return null; }
CommonHttpUtils { public static JsonObject getConfigurationsFromConfigApi(String url,Map<String,Object> headers) { String resultStringPost = null; Gson gson = new Gson(); try { resultStringPost = httpGetMethodWithHeaders(url,headers); if (!StringUtils.isEmpty(resultStringPost)) { return gson.fromJson(resultStringPost, JsonObject.class); } } catch (Exception e) { LOGGER.error("Exceptions occured in getConfigurationsFromConfigApi========",e); return null; } return null; } }
CommonHttpUtils { public static JsonObject getConfigurationsFromConfigApi(String url,Map<String,Object> headers) { String resultStringPost = null; Gson gson = new Gson(); try { resultStringPost = httpGetMethodWithHeaders(url,headers); if (!StringUtils.isEmpty(resultStringPost)) { return gson.fromJson(resultStringPost, JsonObject.class); } } catch (Exception e) { LOGGER.error("Exceptions occured in getConfigurationsFromConfigApi========",e); return null; } return null; }  }
CommonHttpUtils { public static JsonObject getConfigurationsFromConfigApi(String url,Map<String,Object> headers) { String resultStringPost = null; Gson gson = new Gson(); try { resultStringPost = httpGetMethodWithHeaders(url,headers); if (!StringUtils.isEmpty(resultStringPost)) { return gson.fromJson(resultStringPost, JsonObject.class); } } catch (Exception e) { LOGGER.error("Exceptions occured in getConfigurationsFromConfigApi========",e); return null; } return null; }  static Map<String,Object> getHeader(String base64Creds); static JsonObject getConfigurationsFromConfigApi(String url,Map<String,Object> headers); static CloseableHttpClient getCloseableHttpClient(); static String getEnvironmentVariable(String envVar); }
CommonHttpUtils { public static JsonObject getConfigurationsFromConfigApi(String url,Map<String,Object> headers) { String resultStringPost = null; Gson gson = new Gson(); try { resultStringPost = httpGetMethodWithHeaders(url,headers); if (!StringUtils.isEmpty(resultStringPost)) { return gson.fromJson(resultStringPost, JsonObject.class); } } catch (Exception e) { LOGGER.error("Exceptions occured in getConfigurationsFromConfigApi========",e); return null; } return null; }  static Map<String,Object> getHeader(String base64Creds); static JsonObject getConfigurationsFromConfigApi(String url,Map<String,Object> headers); static CloseableHttpClient getCloseableHttpClient(); static String getEnvironmentVariable(String envVar);  }