### Question:
RemoteExecutionOfCommandsAOImpl extends IRODSGenericAO implements RemoteExecutionOfCommandsAO { @Override public InputStream executeARemoteCommandAndGetStreamGivingCommandNameAndArgsAndHost( final String commandToExecuteWithoutArguments, final String argumentsToPassWithCommand, final String executionHost) throws JargonException { log.info("executing remote command"); RemoteExecutionService remoteExecuteService = RemoteExecuteServiceImpl.instance(getIRODSProtocol(), commandToExecuteWithoutArguments, argumentsToPassWithCommand, executionHost); 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 testExecuteARemoteCommandAndGetStreamGivingCommandNameAndArgsAndHost() throws Exception { String cmd = "hello"; String args = ""; String host = "localhost"; IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); RemoteExecutionOfCommandsAO remoteExecutionOfCommandsAO = irodsFileSystem.getIRODSAccessObjectFactory() .getRemoteExecutionOfCommandsAO(irodsAccount); InputStream inputStream = remoteExecutionOfCommandsAO .executeARemoteCommandAndGetStreamGivingCommandNameAndArgsAndHost(cmd, args, host); 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.assertEquals("did not successfully execute hello command", "Hello world from irods".trim(), result.trim()); }