ImportSession { public static void clearSession() { ImportSession session = sessions.get(); if ( session != null ) { sessions.remove(); } }  static ImportSession getSession(); void initialize(); Log getLogger(); @Deprecated Boolean isFileHidden( String filePath ); ManifestFile getManifestFile( String filePath, boolean isFileExist ); RepositoryFileAcl processAclForFile( String filePath ); RepositoryFileExtraMetaData processExtraMetaDataForFile( String filePath ); HashSet<String> getSkippedFiles(); void setSkippedFiles( HashSet<String> skippedFiles ); Boolean getIsNotRunningImport(); ExportManifest getManifest(); void setManifest( ExportManifest manifest ); boolean isApplyAclSettings(); void setApplyAclSettings( boolean applyAclSettings ); boolean isRetainOwnership(); void setRetainOwnership( boolean retainOwnership ); boolean isOverwriteAclSettings(); void setOverwriteAclSettings( boolean overwriteAclSettings ); String getCurrentManifestKey(); void setCurrentManifestKey( String currentManifestKey ); HashSet<String> getFoldersCreatedImplicitly(); void setAclProperties( boolean applyAclSettingsFlag, boolean retainOwnershipFlag,
                                boolean overwriteAclSettingsFlag ); void addImportedRepositoryFile( RepositoryFile repositoryFile ); HashSet<RepositoryFile> getImportedRepositoryFiles(); void addImportedScheduleJobId( String jobId ); List<String> getImportedScheduleJobIds(); static void clearSession(); static IPlatformImporter iPlatformImporter; }
@Test public void testClearSession() { ExportManifest manifest = mock( ExportManifest.class ); ImportSession.getSession().setManifest( manifest ); assertNotNull( ImportSession.getSession().getManifest() ); ImportSession.clearSession(); assertNull( ImportSession.getSession().getManifest() ); }