Return 200 instead of 202 on WorkflowSpecs GET
Change-Id: I861801f86416b98beea98913b3788da8180dbdf9
Issue-ID: SO-1745
Signed-off-by: Kuleshov, Elena <evn@att.com>
throw validateException;
}
throw validateException;
}
- return builder.buildResponse(HttpStatus.SC_ACCEPTED, "", jsonResponse, apiVersion);
+ return builder.buildResponse(HttpStatus.SC_OK, "", jsonResponse, apiVersion);
WorkflowSpecifications expectedResponse = mapper.readValue(new String(Files.readAllBytes(Paths.get("src/test/resources/__files/WorkflowSpecifications.json"))), WorkflowSpecifications.class);
WorkflowSpecifications expectedResponse = mapper.readValue(new String(Files.readAllBytes(Paths.get("src/test/resources/__files/WorkflowSpecifications.json"))), WorkflowSpecifications.class);
- assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
WorkflowSpecifications realResponse = mapper.readValue(response.getBody(), WorkflowSpecifications.class);
assertThat(realResponse, sameBeanAs(expectedResponse));
assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
WorkflowSpecifications realResponse = mapper.readValue(response.getBody(), WorkflowSpecifications.class);
assertThat(realResponse, sameBeanAs(expectedResponse));
assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));