### Question:
DocumentManagerImpl implements DocumentManager { @Override public void changeIndexingStatus(Document doc, int status) { assert (status != AbstractDocument.INDEX_INDEXED); if (status == AbstractDocument.INDEX_SKIP && doc.getIndexed() == AbstractDocument.INDEX_SKIP) return; if (status == AbstractDocument.INDEX_TO_INDEX && doc.getIndexed() == AbstractDocument.INDEX_TO_INDEX) return; if (status == AbstractDocument.INDEX_TO_INDEX_METADATA && doc.getIndexed() == AbstractDocument.INDEX_TO_INDEX_METADATA) return; documentDAO.initialize(doc); if (doc.getIndexed() == AbstractDocument.INDEX_INDEXED) deleteFromIndex(doc); doc.setIndexed(status); try { documentDAO.store(doc); } catch (PersistenceException e) { log.error(e.getMessage(), e); } }  void setListenerManager(DocumentListenerManager listenerManager); void setDocumentDAO(DocumentDAO documentDAO); void setTemplateDAO(TemplateDAO templateDAO); void setIndexer(SearchEngine indexer); @Override void replaceFile(long docId, String fileVersion, InputStream content, DocumentHistory transaction); @Override void replaceFile(long docId, String fileVersion, File newFile, DocumentHistory transaction); @Override void checkin(long docId, File file, String filename, boolean release, AbstractDocument docVO,
			DocumentHistory transaction); @Override void checkin(long docId, InputStream content, String filename, boolean release, AbstractDocument docVO,
			DocumentHistory transaction); @Override void checkout(long docId, DocumentHistory transaction); @Override void lock(long docId, int status, DocumentHistory transaction); @Override void deleteFromIndex(Document doc); @Override String parseDocument(Document doc, String fileVersion); @Override long reindex(long docId, String content); @Override void update(Document doc, Document docVO, DocumentHistory transaction); @Override void moveToFolder(Document doc, Folder folder, DocumentHistory transaction); @Override Document create(InputStream content, Document docVO, DocumentHistory transaction); @Override Document create(File file, Document docVO, DocumentHistory transaction); Document copyToFolder(Document doc, Folder folder, DocumentHistory transaction); @Override void unlock(long docId, DocumentHistory transaction); @Override void makeImmutable(long docId, DocumentHistory transaction); @Override void rename(long docId, String newName, DocumentHistory transaction); @Override Document replaceAlias(long aliasId, DocumentHistory transaction); @Override Document createAlias(Document doc, Folder folder, String aliasType, DocumentHistory transaction); void setVersionDAO(VersionDAO versionDAO); void setStorer(Storer storer); void setConfig(ContextProperties config); @Override void changeIndexingStatus(Document doc, int status); void setUserDAO(UserDAO userDAO); void setFolderDAO(FolderDAO folderDAO); @Override Version deleteVersion(long versionId, DocumentHistory transaction); void setDocumentNoteDAO(DocumentNoteDAO documentNoteDAO); @Override long archiveFolder(long folderId, DocumentHistory transaction); @Override void archiveDocuments(long[] docIds, DocumentHistory transaction); @Override Ticket createDownloadTicket(long docId, String suffix, Integer expireHours, Date expireDate,
			Integer maxDownloads, String urlPrefix, DocumentHistory transaction); void setTicketDAO(TicketDAO ticketDAO); @Override boolean unprotect(String sid, long docId, String password); @Override void promoteVersion(long docId, String version, DocumentHistory transaction);  }### Answer:
@Test public void testChangeIndexingStatus() { Document doc = docDao.findById(1); Assert.assertNotNull(doc); Assert.assertEquals(AbstractDocument.INDEX_INDEXED, doc.getIndexed()); documentManager.changeIndexingStatus(doc, AbstractDocument.INDEX_SKIP); Assert.assertEquals(AbstractDocument.INDEX_SKIP, doc.getIndexed()); doc = docDao.findById(2); Assert.assertNotNull(doc); Assert.assertEquals(AbstractDocument.INDEX_TO_INDEX, doc.getIndexed()); documentManager.changeIndexingStatus(doc, AbstractDocument.INDEX_SKIP); Assert.assertEquals(AbstractDocument.INDEX_SKIP, doc.getIndexed()); }