#fixed code
                             @Test
	public void testAsync() throws JSONException, InterruptedException, ExecutionException {
		Future<HttpResponse<JsonNode>> future = Unirest.post(MockServer.POST)
				.header("accept", "application/json")
				.field("param1", "value1")
				.field("param2", "bye")
				.asJsonAsync();

		assertNotNull(future);

		RequestCapture req = parse(future.get());
		req.assertParam("param1", "value1");
		req.assertParam("param2", "bye");
	}
#vulnerable code 
                             @Test
	public void testAsync() throws JSONException, InterruptedException, ExecutionException {
		Future<HttpResponse<JsonNode>> future = Unirest.post("http://httpbin.org/post").header("accept", "application/json").field("param1", "value1").field("param2", "bye").asJsonAsync();

		assertNotNull(future);
		HttpResponse<JsonNode> jsonResponse = future.get();

		assertTrue(jsonResponse.getHeaders().size() > 0);
		assertTrue(jsonResponse.getBody().toString().length() > 0);
		assertFalse(jsonResponse.getRawBody() == null);
		assertEquals(200, jsonResponse.getStatus());

		JsonNode json = jsonResponse.getBody();
		assertFalse(json.isArray());
		assertNotNull(json.getObject());
		assertNotNull(json.getArray());
		assertEquals(1, json.getArray().length());
		assertNotNull(json.getArray().get(0));
	} 
                            #location 8 
                            #vulnerability type NULL_DEREFERENCE