@Test public void test_should_send_request_to_close_workflow() { server.expect(once(), requestTo("http: .andExpect(method(HttpMethod.POST)) .andExpect(content().string(getFileContents("closeWorkflowRequest.json"))) .andRespond( withSuccess(getFileContents("closeWorkflowResponse.json"), MediaType.APPLICATION_JSON_UTF8)); workflowRepository.close(getCreateWorkflowRequest()); server.verify(); }
public WorkflowResponse close(WorkflowRequest workflowRequest) { return restTemplate.postForObject(closeWorkflowUrl, workflowRequest, WorkflowResponse.class); }
WorkflowRepository { public WorkflowResponse close(WorkflowRequest workflowRequest) { return restTemplate.postForObject(closeWorkflowUrl, workflowRequest, WorkflowResponse.class); } }
WorkflowRepository { public WorkflowResponse close(WorkflowRequest workflowRequest) { return restTemplate.postForObject(closeWorkflowUrl, workflowRequest, WorkflowResponse.class); } @Autowired  WorkflowRepository(@Value("${egov.services.workflow.hostname}") String workflowHostname,
                              @Value("${egov.services.workflow.create_workflow}") String createPath,
                              @Value("${egov.services.workflow.close_workflow}") String closePath,
                              @Value("${egov.services.workflow.update_workflow}") String updatePath,
                              RestTemplate restTemplate); }
WorkflowRepository { public WorkflowResponse close(WorkflowRequest workflowRequest) { return restTemplate.postForObject(closeWorkflowUrl, workflowRequest, WorkflowResponse.class); } @Autowired  WorkflowRepository(@Value("${egov.services.workflow.hostname}") String workflowHostname,
                              @Value("${egov.services.workflow.create_workflow}") String createPath,
                              @Value("${egov.services.workflow.close_workflow}") String closePath,
                              @Value("${egov.services.workflow.update_workflow}") String updatePath,
                              RestTemplate restTemplate); WorkflowResponse create(WorkflowRequest workflowRequest); WorkflowResponse close(WorkflowRequest workflowRequest); WorkflowResponse update(WorkflowRequest workflowRequest); }
WorkflowRepository { public WorkflowResponse close(WorkflowRequest workflowRequest) { return restTemplate.postForObject(closeWorkflowUrl, workflowRequest, WorkflowResponse.class); } @Autowired  WorkflowRepository(@Value("${egov.services.workflow.hostname}") String workflowHostname,
                              @Value("${egov.services.workflow.create_workflow}") String createPath,
                              @Value("${egov.services.workflow.close_workflow}") String closePath,
                              @Value("${egov.services.workflow.update_workflow}") String updatePath,
                              RestTemplate restTemplate); WorkflowResponse create(WorkflowRequest workflowRequest); WorkflowResponse close(WorkflowRequest workflowRequest); WorkflowResponse update(WorkflowRequest workflowRequest);  }