agave-systems/systems-core/src/test/java/org/iplantc/service/transfer/RemoteDataClientPermissionProviderTest.java
/**
	 * Initialize storage system and permission directories
	 * @throws Exception if the client cannot be initialized
	 */
Initialize storage system and permission directories
@throws Exception if the client cannot be initialized
Initialize storage system and permission directories @throws Exception if the client cannot be initialized
protected void init() throws Exception {
		permissionDir = LOCAL_DIR_NAME;
		permissionFile = permissionDir + "/" + LOCAL_BINARY_FILE_NAME;
		JSONObject json = getSystemJson();
    	json.remove("id");
    	json.put("id", this.getClass().getSimpleName());
		StorageSystem system = StorageSystem.fromJSON(json);
    	system.setOwner(SYSTEM_USER);
    	String homeDir = system.getStorageConfig().getHomeDir();
        homeDir = StringUtils.isEmpty(homeDir) ? "" : homeDir;
        system.getStorageConfig().setHomeDir( homeDir + "/" + getClass().getSimpleName());
        this.system = system;
        this.storageConfig = system.getStorageConfig();
        this.salt = system.getSystemId() + system.getStorageConfig().getHost() +
				system.getStorageConfig().getDefaultAuthConfig().getUsername();
        SystemDao dao = Mockito.mock(SystemDao.class);
        Mockito.when(dao.findBySystemId(Mockito.anyString()))
               .thenReturn(this.system);
	}
protected void init ( ) throws Exception { permissionDir = LOCAL_DIR_NAME ; permissionFile = permissionDir + "/" + LOCAL_BINARY_FILE_NAME ; JSONObject json = getSystemJson ( ) ; json . remove ( "id" ) ; json . put ( "id" , this . getClass ( ) . getSimpleName ( ) ) ; StorageSystem system = StorageSystem . fromJSON ( json ) ; system . setOwner ( SYSTEM_USER ) ; String homeDir = system . getStorageConfig ( ) . getHomeDir ( ) ; homeDir = StringUtils . isEmpty ( homeDir ) ? "" : homeDir ; system . getStorageConfig ( ) . setHomeDir ( homeDir + "/" + getClass ( ) . getSimpleName ( ) ) ; this . system = system ; this . storageConfig = system . getStorageConfig ( ) ; this . salt = system . getSystemId ( ) + system . getStorageConfig ( ) . getHost ( ) + system . getStorageConfig ( ) . getDefaultAuthConfig ( ) . getUsername ( ) ; SystemDao dao = Mockito . mock ( SystemDao . class ) ; Mockito . when ( dao . findBySystemId ( Mockito . anyString ( ) ) ) . thenReturn ( this . system ) ; }
Initialize storage system and permission directories
 @throws Exception if the client cannot be initialized
Initialize storage system and permission directories @throws Exception if the client cannot be initialized