#vulnerable code 
                                @Test
    public void testObjectMapperWrite() {
        Unirest.setObjectMapper(new JacksonObjectMapper());

        GetResponse postResponseMock = new GetResponse();
        postResponseMock.setUrl("http://httpbin.org/post");

        HttpResponse<JsonNode> postResponse = Unirest.post(postResponseMock.getUrl()).header("accept", "application/json").header("Content-Type", "application/json").body(postResponseMock).asJson();

        assertEquals(200, postResponse.getStatus());
        assertEquals(postResponse.getBody().getObject().getString("data"), "{\"url\":\"http://httpbin.org/post\"}");
    } 
                            #location 11 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void testObjectMapperWrite() {
        Unirest.setObjectMapper(new JacksonObjectMapper());

        GetResponse postResponseMock = new GetResponse();
        postResponseMock.setUrl(MockServer.POST);

        HttpResponse<JsonNode> postResponse = Unirest.post(postResponseMock.getUrl())
                .header("accept", "application/json")
                .header("Content-Type", "application/json")
                .body(postResponseMock)
                .asJson();

        assertEquals(200, postResponse.getStatus());
        parse(postResponse)
                .asserBody("{\"url\":\"http://localhost:4567/post\"}");
    }