#vulnerable code 
                             @Test
	public void testBasicAuth() throws JSONException, UnirestException {
		HttpResponse<JsonNode> response = Unirest.get("http://httpbin.org/headers").basicAuth("user", "test").asJson();
		assertEquals("Basic dXNlcjp0ZXN0", response.getBody().getObject().getJSONObject("headers").getString("Authorization"));
	} 
                            #location 4 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void testBasicAuth() throws JSONException, UnirestException {
		HttpResponse<JsonNode> response = Unirest.get(MockServer.GETJSON)
				.basicAuth("user", "test")
				.asJson();

		parse(response).assertHeader("Authorization", "Basic dXNlcjp0ZXN0");
	}