### Question:
WebResourceMetaInfoDaoImpl implements WebResourceMetaInfoDao { @Override public WriteResult delete(String id) { return datastore.delete(WebResourceMetaInfo.class, id); } WebResourceMetaInfoDaoImpl(DB mongoDB,Morphia morphia,Datastore datastore); @Override boolean create(WebResourceMetaInfo webResourceMetaInfo, WriteConcern writeConcern); @Override int createOrModify(Collection<WebResourceMetaInfo> webResourceMetaInfos, WriteConcern writeConcern); @Override WebResourceMetaInfo read(String id); @Override List<WebResourceMetaInfo> read(List<String> ids); @Override boolean update(WebResourceMetaInfo webResourceMetaInfo, WriteConcern writeConcern); @Override WriteResult delete(String id);  }### Answer:
@Test public void testDelete() throws Exception { final WebResourceMetaInfo sourceDocumentReferenceMetaInfo = new WebResourceMetaInfo("a", new ImageMetaInfo(10, 10, "", "", "", null, null, null), null, null, null); webResourceMetaInfoDao.createOrModify(Lists.newArrayList(sourceDocumentReferenceMetaInfo), WriteConcern.ACKNOWLEDGED); WebResourceMetaInfo sourceDocumentReferenceMetaInfoFromRead = webResourceMetaInfoDao.read(sourceDocumentReferenceMetaInfo.getId()); assertNotNull(sourceDocumentReferenceMetaInfoFromRead); assertTrue(webResourceMetaInfoDao.delete(sourceDocumentReferenceMetaInfo.getId()).getN() == 1); sourceDocumentReferenceMetaInfoFromRead = webResourceMetaInfoDao.read(sourceDocumentReferenceMetaInfo.getId()); assertNull(sourceDocumentReferenceMetaInfoFromRead); assertFalse(webResourceMetaInfoDao.delete(sourceDocumentReferenceMetaInfo.getId()).getN() == 1); }