### Question:
IndexingManager { public void submitFileForIndexing(int tenantID, String tenantDomain, String path, String sourceURL) throws RegistryException { if (log.isDebugEnabled()) { log.debug("Submitting file " + path + " for Indexing"); } getIndexer().addFile(new AsyncIndexer.File2Index(path, tenantID, tenantDomain, sourceURL)); } private  IndexingManager(); static IndexingManager getInstance(); synchronized void startIndexing(); synchronized void restartIndexing(); synchronized void stopIndexing(); long getStartingDelayInSecs(); boolean canIndex(String path); long getIndexingFreqInSecs(); String getLastAccessTimeLocation(); long getBatchSize(); int getIndexerPoolSize(); boolean isCacheSkipped(); void deleteFromIndex(String oldPath, int tenantId); void submitFileForIndexing(int tenantID, String tenantDomain, String path,
            String sourceURL); Indexer getIndexerForMediaType(String mimeType); UserRegistry getRegistry(int tenantId); Date getLastAccessTime(int tenantId); void setLastAccessTime(int tenantId, Date lastAccessTime);  }### Answer:
@Test public void testSubmitFileForIndexing() throws RegistryException { UserRegistry userRegistry = mock(UserRegistry.class); RegistryService registryService = mock(RegistryService.class); when(registryService.getRegistry(CarbonConstants.REGISTRY_SYSTEM_USERNAME)).thenReturn(userRegistry); Utils.setRegistryService(registryService); IndexingManager manager = IndexingManager.getInstance(); manager.submitFileForIndexing(-1234, "carbon.super", "/_system/local/index", null); }