### Question:
HttpHelper { public static String jsonArrayToString(JSONArray jsonArray) { return jsonArray.toJSONString().substring(1, jsonArray.toJSONString().length() - 1).replaceAll("[,\"]{1,5}", " ").trim(); } HttpHelper(); static boolean couldBeAUrl(String url); static JSONObject getErrorAsJson(String error, String errorDescription); static MsgResponse getAPI(String accessToken, String targetApi); static MsgResponse getAPI(String targetApi); static MsgResponse postTokenExchange(String clientId, String clientSecret, String redirectUri, String authCode,
      String tokenEndpoint, String codeVerifier); static MsgResponse postMessage(List<NameValuePair> formParameters, String targetUrl, String acceptContentType); static JSONObject retrieveAndRegister(String discoveryUrl, String redirectUri); static JSONObject retrieveAndRegister(String discoveryUrl, String redirectUri, boolean updateProvider, boolean updateIssuer); static String getErrorForRedirect(String redirectUri, String error, String errorDescription); static String stringArrayToString(String[] jsonArray); static String jsonArrayToString(JSONArray jsonArray); static String stringArrayToString(String[] jsonArray, String separator); static String extractAccessToken(ParameterValidatorResult accessTokenParam, String authHeader); static String urlEncode(String input); static String readMessageBody(BufferedReader reader); static boolean checkForDynamicProvider(String provider, ParameterValidatorResult issuer,
                                                 ParameterValidatorResult discoveryUrlResult, boolean acceptDynamicProvider);  }### Answer:
@Test public void testJsonArrayToString() { JSONArray array = new JSONArray(); array.add("first"); array.add("second"); array.add("third"); assertEquals("first second third", HttpHelper.jsonArrayToString(array) ); }