agave-systems/systems-core/src/test/java/org/iplantc/service/transfer/AbstractPathResolutionTests.java
/**
	 * Creates a mock {@link RemoteDataClient} instance of type {@link #getRemoteDataClientClass()}}
	 * with rootDir and homeDir set to the proper values and {@link RemoteDataClient#resolvePath(String)}
	 * left to call the real method.
	 * @param rootDir the {@link StorageConfig#getRootDir()}
	 * @param homeDir the {@link StorageConfig#getHomeDir()}
	 * @return a mocked {@link RemoteDataClient} to test
	 * @throws Exception
	 */
Creates a mock  RemoteDataClient instance of type  #getRemoteDataClientClass()}
with rootDir and homeDir set to the proper values and  RemoteDataClient#resolvePath(String)
left to call the real method.
Creates a mock RemoteDataClient instance of type #getRemoteDataClientClass () } with rootDir and homeDir set to the proper values and RemoteDataClient#resolvePath ( String ) left to call the real method .
protected RemoteDataClient createRemoteDataClient(String rootDir, String homeDir)  throws Exception {
		Path rootPath = Paths.get(rootDir.isEmpty() ? "/" : rootDir);
		Path homePath = rootPath.resolve(homeDir.startsWith("/") ? homeDir.substring(1) : homeDir);
		String srootPath = rootPath.toString();
		srootPath += srootPath.endsWith("/") ? "" : "/";
		String shomePath = homePath.toString();
		shomePath += shomePath.endsWith("/") ? "" : "/";
		RemoteDataClient remoteDataClient = mock(getRemoteDataClientClass());
		when(remoteDataClient.getRootDir()).thenReturn(srootPath);
		when(remoteDataClient.getHomeDir()).thenReturn(shomePath);
		when(remoteDataClient.resolvePath(anyString())).thenCallRealMethod();
		return remoteDataClient;
	}
protected RemoteDataClient createRemoteDataClient ( String rootDir , String homeDir ) throws Exception { Path rootPath = Paths . get ( rootDir . isEmpty ( ) ? "/" : rootDir ) ; Path homePath = rootPath . resolve ( homeDir . startsWith ( "/" ) ? homeDir . substring ( 1 ) : homeDir ) ; String srootPath = rootPath . toString ( ) ; srootPath += srootPath . endsWith ( "/" ) ? "" : "/" ; String shomePath = homePath . toString ( ) ; shomePath += shomePath . endsWith ( "/" ) ? "" : "/" ; RemoteDataClient remoteDataClient = mock ( getRemoteDataClientClass ( ) ) ; when ( remoteDataClient . getRootDir ( ) ) . thenReturn ( srootPath ) ; when ( remoteDataClient . getHomeDir ( ) ) . thenReturn ( shomePath ) ; when ( remoteDataClient . resolvePath ( anyString ( ) ) ) . thenCallRealMethod ( ) ; return remoteDataClient ; }
Creates a mock {@link RemoteDataClient} instance of type {@link #getRemoteDataClientClass()}}
 with rootDir and homeDir set to the proper values and {@link RemoteDataClient#resolvePath(String)}
 left to call the real method.
Creates a mock { @link RemoteDataClient } instance of type { @link #getRemoteDataClientClass () }} with rootDir and homeDir set to the proper values and { @link RemoteDataClient#resolvePath ( String ) } left to call the real method .