@Test public void testShouldSendRequestToUpdateWorkflow() { server.expect(once(), requestTo("http: .andExpect(method(HttpMethod.POST)) .andExpect(content().string(getFileContents("updateWorkflowRequest.json"))) .andRespond( withSuccess(getFileContents("updateWorkflowResponse.json"), MediaType.APPLICATION_JSON_UTF8)); workflowRepository.update(getCreateWorkflowRequest()); server.verify(); }
public WorkflowResponse update(WorkflowRequest workflowRequest) { return restTemplate.postForObject(updateWorkflowUrl, workflowRequest, WorkflowResponse.class); }
WorkflowRepository { public WorkflowResponse update(WorkflowRequest workflowRequest) { return restTemplate.postForObject(updateWorkflowUrl, workflowRequest, WorkflowResponse.class); } }
WorkflowRepository { public WorkflowResponse update(WorkflowRequest workflowRequest) { return restTemplate.postForObject(updateWorkflowUrl, 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 update(WorkflowRequest workflowRequest) { return restTemplate.postForObject(updateWorkflowUrl, 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 update(WorkflowRequest workflowRequest) { return restTemplate.postForObject(updateWorkflowUrl, 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);  }