FlowRunnerImpl implements FlowRunner { protected void copyJobDataToResponse(RunFlowResponse response, RunFlowResponse jobDocument) { response.setStartTime(jobDocument.getStartTime()); response.setEndTime(jobDocument.getEndTime()); response.setUser(jobDocument.getUser()); response.setLastAttemptedStep(jobDocument.getLastAttemptedStep()); response.setLastCompletedStep(jobDocument.getLastCompletedStep()); } FlowRunnerImpl();  FlowRunnerImpl(String host, String username, String password);  FlowRunnerImpl(HubConfig hubConfig); @Override FlowRunner onStatusChanged(FlowStatusListener listener); @Deprecated RunFlowResponse runFlow(String flowName); @Deprecated RunFlowResponse runFlow(String flowName, List<String> stepNums); @Deprecated RunFlowResponse runFlow(String flowName, String jobId); @Deprecated RunFlowResponse runFlow(String flowName, List<String> stepNums, String jobId); @Deprecated RunFlowResponse runFlow(String flowName, String jobId, Map<String, Object> options); @Deprecated RunFlowResponse runFlow(String flowName, List<String> stepNums,  String jobId, Map<String, Object> options); @Deprecated RunFlowResponse runFlow(String flowName, List<String> stepNums, String jobId, Map<String, Object> options, Map<String, Object> stepConfig); @Override RunFlowResponse runFlow(FlowInputs flowInputs); void stopJob(String jobId); void awaitCompletion(); void awaitCompletion(long timeout, TimeUnit unit); List<String> getQueuedJobIdsFromFlow(String flowName); RunFlowResponse getJobResponseById(String jobId); boolean isJobRunning(); String getRunningStepKey(); Flow getRunningFlow(); void setHubConfig(HubConfig hubConfig); void setStepRunnerFactory(StepRunnerFactory stepRunnerFactory); void setFlowManager(FlowManager flowManager); HubConfig getHubConfig();  }
@Test void copyJobDataToResponse() { RunFlowResponse jobDocument = new RunFlowResponse(); jobDocument.setStartTime("2019-01-01T00:00:00"); jobDocument.setEndTime("2019-01-01T01:00:00"); jobDocument.setUser("someone"); jobDocument.setLastAttemptedStep("3"); jobDocument.setLastCompletedStep("2"); RunFlowResponse response = new RunFlowResponse(); new FlowRunnerImpl().copyJobDataToResponse(response, jobDocument); assertEquals("2019-01-01T00:00:00", response.getStartTime()); assertEquals("2019-01-01T01:00:00", response.getEndTime()); assertEquals("someone", response.getUser()); assertEquals("3", response.getLastAttemptedStep()); assertEquals("2", response.getLastCompletedStep()); }