@Test void testExecuteScriptValueOutput() throws IOException, URISyntaxException { CloseableHttpResponse executeScriptResponse = getExecuteScriptHttpResponse(); CloseableHttpResponse getScriptResultResponse = getScriptResultHttpResponse(); ArgumentCaptor<HttpUriRequest> requestsCaptor = ArgumentCaptor.forClass(HttpUriRequest.class); when(httpClient.execute(requestsCaptor.capture())) .thenReturn(executeScriptResponse, getScriptResultResponse); String script = "script"; String resultValue = rScriptExecutor.executeScript(script, null); assertEquals("value", resultValue); List<HttpUriRequest> requests = requestsCaptor.getAllValues(); assertEquals( new URI("http: requests.get(0).getURI()); assertEquals( new URI("http: }
String executeScript(String script, String outputPathname) { String scriptOutputFilename; if (outputPathname != null) { scriptOutputFilename = generateRandomString(); script = script.replace(outputPathname, scriptOutputFilename); } else { scriptOutputFilename = null; } try { String openCpuSessionKey = executeScriptExecuteRequest(script); return executeScriptGetResponseRequest( openCpuSessionKey, scriptOutputFilename, outputPathname); } catch (IOException e) { throw new UncheckedIOException(e); } }
RScriptExecutor { String executeScript(String script, String outputPathname) { String scriptOutputFilename; if (outputPathname != null) { scriptOutputFilename = generateRandomString(); script = script.replace(outputPathname, scriptOutputFilename); } else { scriptOutputFilename = null; } try { String openCpuSessionKey = executeScriptExecuteRequest(script); return executeScriptGetResponseRequest( openCpuSessionKey, scriptOutputFilename, outputPathname); } catch (IOException e) { throw new UncheckedIOException(e); } } }
RScriptExecutor { String executeScript(String script, String outputPathname) { String scriptOutputFilename; if (outputPathname != null) { scriptOutputFilename = generateRandomString(); script = script.replace(outputPathname, scriptOutputFilename); } else { scriptOutputFilename = null; } try { String openCpuSessionKey = executeScriptExecuteRequest(script); return executeScriptGetResponseRequest( openCpuSessionKey, scriptOutputFilename, outputPathname); } catch (IOException e) { throw new UncheckedIOException(e); } } RScriptExecutor(CloseableHttpClient httpClient, OpenCpuSettings openCpuSettings); }
RScriptExecutor { String executeScript(String script, String outputPathname) { String scriptOutputFilename; if (outputPathname != null) { scriptOutputFilename = generateRandomString(); script = script.replace(outputPathname, scriptOutputFilename); } else { scriptOutputFilename = null; } try { String openCpuSessionKey = executeScriptExecuteRequest(script); return executeScriptGetResponseRequest( openCpuSessionKey, scriptOutputFilename, outputPathname); } catch (IOException e) { throw new UncheckedIOException(e); } } RScriptExecutor(CloseableHttpClient httpClient, OpenCpuSettings openCpuSettings);  }
RScriptExecutor { String executeScript(String script, String outputPathname) { String scriptOutputFilename; if (outputPathname != null) { scriptOutputFilename = generateRandomString(); script = script.replace(outputPathname, scriptOutputFilename); } else { scriptOutputFilename = null; } try { String openCpuSessionKey = executeScriptExecuteRequest(script); return executeScriptGetResponseRequest( openCpuSessionKey, scriptOutputFilename, outputPathname); } catch (IOException e) { throw new UncheckedIOException(e); } } RScriptExecutor(CloseableHttpClient httpClient, OpenCpuSettings openCpuSettings);   }