#vulnerable code 
                                @Test
    public void canFindOneWithObjectId() throws Exception {
        /* given */
        People john = new People("John", "22 Wall Street Avenue");
        collection.save(john);

        People foundPeople = collection.findOne(john.getId()).as(People.class);

        /* then */
        assertThat(foundPeople).isNotNull();
        assertThat(foundPeople.getId()).isEqualTo(john.getId());
    } 
                            #location 11 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void canFindOneWithObjectId() throws Exception {
        /* given */
        Friend john = new Friend("John", "22 Wall Street Avenue");
        collection.save(john);

        Friend foundFriend = collection.findOne(john.getId()).as(Friend.class);

        /* then */
        assertThat(foundFriend).isNotNull();
        assertThat(foundFriend.getId()).isEqualTo(john.getId());
    }