#fixed code
                                @Test
    public void testCreatorGetterAnnotated() throws Exception {
        CreatorGetterAnnotated o = new CreatorGetterAnnotated("blah");
        JacksonDBCollection<CreatorGetterAnnotated, String> coll = createCollFor(o, String.class);
        coll.insert(o);
        CreatorGetterAnnotated result = coll.findOneById("blah");
        assertThat(result, notNullValue());
        assertThat(result.getId(), equalTo("blah"));
    }
#vulnerable code 
                                @Test
    public void testCreatorGetterAnnotated() throws Exception {
        CreatorGetterAnnotated o = new CreatorGetterAnnotated("blah");
        JacksonDBCollection<CreatorGetterAnnotated, String> coll = createCollFor(o, String.class);
        WriteResult<CreatorGetterAnnotated, String> writeResult = coll.insert(o);
        assertThat(writeResult.getSavedId(), equalTo("blah"));
        assertThat(writeResult.getDbObject().get("id"), nullValue());
        CreatorGetterAnnotated result = coll.findOneById("blah");
        assertThat(result, notNullValue());
        assertThat(result.getId(), equalTo("blah"));
    } 
                            #location 10 
                            #vulnerability type NULL_DEREFERENCE