#vulnerable code 
                             @Test
	public void testCustomUserAgent() throws JSONException, UnirestException {
		HttpResponse<JsonNode> response = Unirest.get("http://httpbin.org/get?name=mark").header("user-agent", "hello-world").asJson();
		assertEquals("hello-world", response.getBody().getObject().getJSONObject("headers").getString("User-Agent"));

		GetRequest getRequest = Unirest.get("http");
		for (Object current : Arrays.asList(0, 1, 2)) {
			getRequest.queryString("name", current);
		}

	} 
                            #location 4 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void testCustomUserAgent() throws JSONException, UnirestException {
		HttpResponse<JsonNode> response = Unirest.get(MockServer.GETJSON)
                .header("user-agent", "hello-world")
                .asJson();

        RequestCapture json = parse(response);
        json.assertHeader("User-Agent", "hello-world");
	}