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

        /* when */
        People people = collection.findOne().as(People.class);

        /* then */
        assertThat(people.getName()).isEqualTo("John");
    } 
                            #location 10 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void canFindOneWithEmptyQuery() throws Exception {
        /* given */
        collection.save(new Friend("John", "22 Wall Street Avenue"));

        /* when */
        Friend friend = collection.findOne().as(Friend.class);

        /* then */
        assertThat(friend.getName()).isEqualTo("John");
    }