### Question:
DocumentManagementImpl extends DocumentManagementBase implements DocumentManagement, EntryEvictedListener<DocumentKey, Document> { public void evictDocument(DocumentKey docKey, Document doc) { logger.trace("evictDocument.enter; docKey: {}, doc: {}", docKey, doc); cntCache.delete(docKey); int size = deleteDocumentElements(doc.getFragments(), doc.getTypeRoot()); logger.trace("evictDocument.exit; evicted: {}", size); }  void setRepository(SchemaRepositoryImpl repo); void setCacheContent(boolean cacheContent); void setCacheElements(boolean cacheElements); void setCompressContent(boolean compressContent); void setDocumentIdGenerator(IdGenerator<Long> docGen); void setContentCache(IMap<DocumentKey, Object> cache); void setDocumentCache(IMap<DocumentKey, Document> cache); void setElementCache(IMap<DataKey, Elements> cache); void setHzInstance(HazelcastInstance hzInstance); void setIndexManager(IndexManagementImpl indexManager); void setStatsQueue(BlockingQueue<StatisticsEvent> queue); void setStatsEnabled(boolean enable); void setDistrService(DataDistributionService ddSvc); void setExecPool(ExecutorService execSvc); java.util.Collection<Elements> getDocumentElements(String uri); Document getDocument(DocumentKey docKey); @Override String getDocumentContentType(long docKey); @Override DocumentAccessor getDocument(String uri, Properties props); @Override DocumentAccessor getDocument(long docKey, Properties props); @Override DocumentAccessor getDocument(DocumentKey docKey, Properties props); @Override ResultCursor<DocumentAccessor> getDocuments(final String pattern, final Properties props); String checkDefaultDocumentCollection(Document doc); Map<DocumentKey, Document> createDocument(DocumentKey docKey, String uri, Object content, String srcFormat, Date createdAt, String createdBy,
			long txStart, int[] collections); Document processDocument(Map.Entry<DocumentKey, Document> old, long txId, String uri, String user, Object content, ParseResults pRes, Properties props); @Override DocumentAccessor storeDocument(String uri, T content, Properties props); @Override ResultCursor<DocumentAccessor> storeDocuments(final Map<String, T> documents, final Properties props); @Override DocumentAccessor removeDocument(String uri, Properties props); Object processDocumentRemoval(Map.Entry<DocumentKey, Document> entry, Properties properties, long txStart, Document doc); void cleanDocument(DocumentKey docKey, boolean complete); void evictDocument(DocumentKey docKey, Document doc); void rollbackDocument(DocumentKey docKey); @Override java.util.Collection<String> getCollections(); @Override ResultCursor<DocumentAccessor> removeDocuments(final String pattern, final Properties props); @Override int addDocumentToCollections(String uri, String[] collections); @Override int removeDocumentFromCollections(String uri, String[] collections); int updateDocumentCollections(boolean add, Map.Entry<DocumentKey, Document> entry, String[] collections); @Override void entryEvicted(EntryEvent<DocumentKey, Document> event);  }### Answer:
@Test public void evictDocumentTest() throws Exception { storeSecurityTest(); HazelcastInstance hz = ((SchemaRepositoryImpl) xRepo).getHzInstance(); IMap<DocumentKey, Document> chDocs = hz.getMap(CN_XDM_DOCUMENT); assertEquals(4, chDocs.size()); IMap<DocumentKey, Document> chCont = hz.getMap(CN_XDM_CONTENT); assertEquals(4, chCont.size()); IMap<DocumentKey, Document> chElts = hz.getMap(CN_XDM_ELEMENT); int eSize = chElts.size(); int cnt = chCont.size(); for (Iterator<Map.Entry<DocumentKey, Document>> itr = chDocs.entrySet().iterator(); itr.hasNext();) { Map.Entry<DocumentKey, Document> entry = itr.next(); chDocs.evict(entry.getKey()); Thread.sleep(50); assertEquals(--cnt, chCont.size()); assertTrue(chElts.size() < eSize); eSize = chElts.size(); } assertEquals(0, chElts.size()); assertEquals(0, chCont.size()); assertEquals(0, chDocs.size()); uris.clear(); }