### Question:
EcmFileToSolrTransformer implements AcmObjectToSolrDocTransformer<EcmFile> { @Override public SolrContentDocument toContentFileIndex(EcmFile in) { if (enableContentFileIndexing) { return mapContentDocumentProperties(in); } return null; }  @Override List<EcmFile> getObjectsModifiedSince(Date lastModified, int start, int pageSize); @Override SolrContentDocument toContentFileIndex(EcmFile in); @Override SolrAdvancedSearchDocument toSolrAdvancedSearch(EcmFile in); @Override SolrDocument toSolrQuickSearch(EcmFile in); @Override boolean isAcmObjectTypeSupported(Class acmObjectType); EcmFileDao getEcmFileDao(); void setEcmFileDao(EcmFileDao ecmFileDao); Boolean getEnableContentFileIndexing(); void setEnableContentFileIndexing(Boolean enableContentFileIndexing); Boolean getEnableDocumentACL(); void setEnableDocumentACL(Boolean enableDocumentACL); UserDao getUserDao(); void setUserDao(UserDao userDao); @Override Class<?> getAcmObjectTypeSupported(); SearchAccessControlFields getSearchAccessControlFields(); void setSearchAccessControlFields(SearchAccessControlFields searchAccessControlFields); ArkCaseBeanUtils getArkCaseBeanUtils(); AcmDataService getAcmDataService(); void setAcmDataService(AcmDataService acmDataService);  }### Answer:
@Test public void toContentFileIndex() { unit.setEnableContentFileIndexing(true); mockSearchAccessControlFields.setAccessControlFields(anyObject(SolrBaseDocument.class), anyObject(AcmAssignedObject.class)); expectLastCall(); expect(mockUserDao.quietFindByUserId(eq("user"))).andReturn(user).times(2); expect(mockUserDao.quietFindByUserId(null)).andReturn(null); replayAll(); SolrContentDocument result = unit.toContentFileIndex(in); verifyAll(); validateResult(result); }