#vulnerable code 
                                @Test
    public void canModifyAlreadySavedEntity() throws Exception {
        /* given */
        String idAsString = collection.save(new People("John", "21 Jump Street"));
        ObjectId id = new ObjectId(idAsString);
        People people = collection.findOne(id).as(People.class);
        people.setAddress("new address");

        /* when */
        collection.save(people);

        /* then */
        people = collection.findOne(id).as(People.class);
        assertThat(people.getId()).isEqualTo(id);
        assertThat(people.getAddress()).isEqualTo("new address");
    } 
                            #location 14 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void canModifyAlreadySavedEntity() throws Exception {
        /* given */
        People john = new People("John", "21 Jump Street");
        collection.save(john);
        john.setAddress("new address");

        /* when */
        collection.save(john);

        /* then */
        ObjectId johnId = john.getId();
        People johnWithNewAddress = collection.findOne(johnId).as(People.class);
        assertThat(johnWithNewAddress.getId()).isEqualTo(johnId);
        assertThat(johnWithNewAddress.getAddress()).isEqualTo("new address");
    }