#vulnerable code 
                                @Test
    public void canSaveAnObjectWithAnObjectId() throws Exception {

        People john = new People(new ObjectId("47cc67093475061e3d95369d"), "John");

        String id = collection.save(john);

        People result = collection.findOne(new ObjectId(id)).as(People.class);
        assertThat(result).isNotNull();
        assertThat(result.getId()).isEqualTo("47cc67093475061e3d95369d");
    } 
                            #location 10 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void canSaveAnObjectWithAnObjectId() throws Exception {

        People john = new People(new ObjectId("47cc67093475061e3d95369d"), "John");

        collection.save(john);

        People result = collection.findOne(new ObjectId("47cc67093475061e3d95369d")).as(People.class);
        assertThat(result).isNotNull();
    }