### Question:
FolderAndFilesUtils { public String getActiveVersionCmisId(EcmFile ecmFile) { List<EcmFileVersion> versions = ecmFile.getVersions(); if (versions == null) { return ecmFile.getVersionSeriesId(); } String cmisId = null; for (EcmFileVersion version : versions) { if (version.getVersionTag().equals(ecmFile.getActiveVersionTag())) { cmisId = version.getCmisObjectId(); } } if (cmisId == null) { cmisId = ecmFile.getVersionSeriesId(); } return cmisId; }  String buildSafeFolderName(String folderName); String getActiveVersionCmisId(EcmFile ecmFile); String getVersionCmisId(EcmFile ecmFile, String version); EcmFileVersion getVersion(EcmFile ecmFile, String version); String createUniqueIdentificator(String input); String createUniqueFolderName(String name); Long convertToLong(String folderId); EcmFile findMatchingPDFFileType(List<EcmFile> fileList, String fileType); String getBaseFileName(String fileName); String getBaseFileName(String fileName, String fileExtension); String getFileNameExtension(String fileName); EcmFile uploadFile(EcmEvent ecmEvent, AcmFolder targetParentFolder); EcmFile uploadFile(String nodeId, String nodeName, String userId, AcmFolder targetParentFolder); String findFileType(Document cmisDocument); Document lookupCmisDocument(String cmisRepositoryId, String nodeId); AcmContainer lookupArkCaseContainer(Long parentFolderId); EcmFile lookupArkCaseFile(String nodeId, Long parentFolderId); EcmFile lookupArkCaseFile(String fileCmisId); AcmFolder lookupArkCaseFolder(String folderCmisId); AcmFolderDao getFolderDao(); void setFolderDao(AcmFolderDao folderDao); EcmFileDao getFileDao(); void setFileDao(EcmFileDao fileDao); AcmFolderService getFolderService(); void setFolderService(AcmFolderService folderService); EcmFileService getFileService(); void setFileService(EcmFileService fileService); boolean isSearchablePDF(File file, String finalMimeType);  }### Answer:
@Test public void testGetActiveVersionCmisId() throws Exception { List<EcmFileVersion> versions = new ArrayList(); String firstCmisId = "workspace:\\/\\/SpacesStore\\/c26d9627-ce0f-494e-a57b-fdfe2f3afb5d;1.0"; String secondCmisId = "workspace:\\/\\/SpacesStore\\/c26d9627-ce0f-494e-a57b-fdfe2f3afb5d;2.0"; EcmFile ecmFile = new EcmFile(); EcmFileVersion versionFirst = new EcmFileVersion(); versionFirst.setVersionTag("versionTag1"); versionFirst.setCmisObjectId(firstCmisId); versions.add(versionFirst); EcmFileVersion versionSecond = new EcmFileVersion(); versionSecond.setVersionTag("versionTag2"); versionSecond.setCmisObjectId(secondCmisId); versions.add(versionSecond); ecmFile.setVersions(versions); ecmFile.setActiveVersionTag("versionTag1"); ecmFile.setVersionSeriesId("testVersionId"); String cmisId = unit.getActiveVersionCmisId(ecmFile); assertEquals(cmisId, firstCmisId); ecmFile.setActiveVersionTag("versionTag2"); cmisId = unit.getActiveVersionCmisId(ecmFile); assertEquals(cmisId, secondCmisId); }