### Question:
RemoteExecutionOfCommandsAOImpl extends IRODSGenericAO implements RemoteExecutionOfCommandsAO { @Override public InputStream executeARemoteCommandAndGetStreamAddingPhysicalPathAsFirstArgumentToRemoteScript( final String commandToExecuteWithoutArguments, final String argumentsToPassWithCommand, final String absolutePathOfIrodsFileThatWillBeUsedToFindHostToExecuteOn) throws JargonException { log.info("executing remote command"); RemoteExecutionService remoteExecuteService = RemoteExecuteServiceImpl.instanceWhenUsingAbsPathToSetCommandArg( getIRODSProtocol(), commandToExecuteWithoutArguments, argumentsToPassWithCommand, "", absolutePathOfIrodsFileThatWillBeUsedToFindHostToExecuteOn); if (isAbleToStreamLargeResults()) { return remoteExecuteService.executeAndStream(); } else { return remoteExecuteService.execute(); } } protected  RemoteExecutionOfCommandsAOImpl(final IRODSSession irodsSession, final IRODSAccount irodsAccount); @Override InputStream executeARemoteCommandAndGetStreamGivingCommandNameAndArgs(
			final String commandToExecuteWithoutArguments, final String argumentsToPassWithCommand); @Override InputStream executeARemoteCommandAndGetStreamGivingCommandNameAndArgsAndHost(
			final String commandToExecuteWithoutArguments, final String argumentsToPassWithCommand,
			final String executionHost); @Override InputStream executeARemoteCommandAndGetStreamAddingPhysicalPathAsFirstArgumentToRemoteScript(
			final String commandToExecuteWithoutArguments, final String argumentsToPassWithCommand,
			final String absolutePathOfIrodsFileThatWillBeUsedToFindHostToExecuteOn); @Override InputStream executeARemoteCommandAndGetStreamUsingAnIRODSFileAbsPathToDetermineHost(
			final String commandToExecuteWithoutArguments, final String argumentsToPassWithCommand,
			final String absolutePathOfIrodsFileThatWillBeUsedToFindHostToExecuteOn);  }### Answer:
@Test public final void testExecuteARemoteCommandAndGetStreamUsingAnIRODSFileAbsPathToAddPhysPathToCommandArgs() throws Exception { String cmd = "hello"; String args = ""; IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); String testFileName = "testExecuteARemoteCommandAndGetStreamUsingAnIRODSFileAbsPathToAddPhysPathToCommandArgs.txt"; String absPath = scratchFileUtils.createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH); String localFileName = FileGenerator.generateFileOfFixedLengthGivenName(absPath, testFileName, 1); String targetIrodsFile = testingPropertiesHelper.buildIRODSCollectionAbsolutePathFromTestProperties( testingProperties, IRODS_TEST_SUBDIR_PATH + '/' + testFileName); String targetIrodsCollection = testingPropertiesHelper .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory(); DataTransferOperations dto = accessObjectFactory.getDataTransferOperations(irodsAccount); dto.putOperation(localFileName, targetIrodsCollection, testingProperties.getProperty(TestingPropertiesHelper.IRODS_RESOURCE_KEY), null, null); RemoteExecutionOfCommandsAO remoteExecutionOfCommandsAO = irodsFileSystem.getIRODSAccessObjectFactory() .getRemoteExecutionOfCommandsAO(irodsAccount); InputStream inputStream = remoteExecutionOfCommandsAO .executeARemoteCommandAndGetStreamAddingPhysicalPathAsFirstArgumentToRemoteScript(cmd, args, targetIrodsFile); BufferedReader br = new BufferedReader(new InputStreamReader(inputStream)); StringBuilder sb = new StringBuilder(); String line = null; while ((line = br.readLine()) != null) { sb.append(line + "\n"); } br.close(); String result = sb.toString(); Assert.assertFalse("did not successfully execute hello command", "Hello world from irods".trim().equals(result.trim())); Assert.assertTrue("should have responded with file name in response", result.indexOf(testFileName) > -1); }