Merge "fixed sonar issue in MsoNetworkAdapterImpl"
[so.git] / mso-api-handlers / mso-api-handler-infra / src / test / java / org / onap / so / apihandlerinfra / OrchestrationRequestsTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.apihandlerinfra;
22
23 import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
24 import static com.github.tomakehurst.wiremock.client.WireMock.any;
25 import static com.github.tomakehurst.wiremock.client.WireMock.equalTo;
26 import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
27 import static com.github.tomakehurst.wiremock.client.WireMock.get;
28 import static com.github.tomakehurst.wiremock.client.WireMock.post;
29 import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
30 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
31 import static com.shazam.shazamcrest.MatcherAssert.assertThat;
32 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
33 import static org.junit.Assert.assertEquals;
34
35 import java.io.File;
36 import java.io.IOException;
37 import java.nio.file.Files;
38 import java.nio.file.Paths;
39 import java.util.ArrayList;
40 import java.util.HashMap;
41 import java.util.List;
42 import java.util.Map;
43
44 import javax.ws.rs.core.HttpHeaders;
45 import javax.ws.rs.core.MediaType;
46 import javax.ws.rs.core.Response;
47
48 import org.apache.http.HttpStatus;
49 import org.junit.Ignore;
50 import org.junit.Test;
51 import org.onap.so.apihandler.common.ErrorNumbers;
52 import org.onap.so.db.request.beans.InfraActiveRequests;
53 import org.onap.so.db.request.client.RequestsDbClient;
54 import org.onap.so.exceptions.ValidationException;
55 import org.onap.so.serviceinstancebeans.GetOrchestrationListResponse;
56 import org.onap.so.serviceinstancebeans.GetOrchestrationResponse;
57 import org.onap.so.serviceinstancebeans.Request;
58 import org.onap.so.serviceinstancebeans.RequestError;
59 import org.onap.so.serviceinstancebeans.RequestProcessingData;
60 import org.onap.so.serviceinstancebeans.ServiceException;
61 import org.springframework.beans.factory.annotation.Autowired;
62 import org.springframework.http.HttpEntity;
63 import org.springframework.http.HttpMethod;
64 import org.springframework.http.ResponseEntity;
65 import org.springframework.web.util.UriComponentsBuilder;
66
67 import com.fasterxml.jackson.core.JsonParseException;
68 import com.fasterxml.jackson.core.type.TypeReference;
69 import com.fasterxml.jackson.databind.DeserializationFeature;
70 import com.fasterxml.jackson.databind.JsonMappingException;
71 import com.fasterxml.jackson.databind.ObjectMapper;
72
73 public class OrchestrationRequestsTest extends BaseTest {
74     @Autowired
75     private RequestsDbClient requestsDbClient;
76     
77     @Autowired 
78     private OrchestrationRequests orchReq;
79
80     private static final GetOrchestrationListResponse ORCHESTRATION_LIST = generateOrchestrationList();
81     private static final String INVALID_REQUEST_ID = "invalid-request-id";
82
83     private static GetOrchestrationListResponse generateOrchestrationList() {
84         GetOrchestrationListResponse list = null;
85         try {
86             ObjectMapper mapper = new ObjectMapper();
87             list = mapper.readValue(new File("src/test/resources/OrchestrationRequest/OrchestrationList.json"),
88                     GetOrchestrationListResponse.class);
89         } catch (JsonParseException jpe) {
90             jpe.printStackTrace();
91         } catch (JsonMappingException jme) {
92             jme.printStackTrace();
93         } catch (IOException ioe) {
94             ioe.printStackTrace();
95         }
96         return list;
97     }
98
99     @Test
100     public void testGetOrchestrationRequest() throws Exception {
101         setupTestGetOrchestrationRequest();
102         // TEST VALID REQUEST
103         GetOrchestrationResponse testResponse = new GetOrchestrationResponse();
104
105         Request request = ORCHESTRATION_LIST.getRequestList().get(1).getRequest();
106         testResponse.setRequest(request);
107         String testRequestId = request.getRequestId();
108
109         headers.set("Accept", MediaType.APPLICATION_JSON);
110         headers.set("Content-Type", MediaType.APPLICATION_JSON);
111         HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
112
113         UriComponentsBuilder builder = UriComponentsBuilder
114                 .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v7/" + testRequestId));
115
116         ResponseEntity<GetOrchestrationResponse> response = restTemplate.exchange(builder.toUriString(), HttpMethod.GET,
117                 entity, GetOrchestrationResponse.class);
118
119         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
120         assertThat(response.getBody(),
121                 sameBeanAs(testResponse).ignoring("request.startTime").ignoring("request.requestStatus.finishTime"));
122         assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
123         assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
124         assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
125         assertEquals("7.0.0", response.getHeaders().get("X-LatestVersion").get(0));
126         assertEquals("00032ab7-na18-42e5-965d-8ea592502018", response.getHeaders().get("X-TransactionID").get(0));
127     }
128
129     @Test
130     public void testGetOrchestrationRequestRequestDetails() throws Exception {
131         setupTestGetOrchestrationRequestRequestDetails("00032ab7-3fb3-42e5-965d-8ea592502017", "COMPLETED");
132         //Test request with modelInfo request body
133         GetOrchestrationResponse testResponse = new GetOrchestrationResponse();
134
135         Request request = ORCHESTRATION_LIST.getRequestList().get(0).getRequest();
136         testResponse.setRequest(request);
137         String testRequestId = request.getRequestId();
138
139         headers.set("Accept", MediaType.APPLICATION_JSON);
140         headers.set("Content-Type", MediaType.APPLICATION_JSON);
141         HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
142
143         UriComponentsBuilder builder = UriComponentsBuilder
144                 .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v7/" + testRequestId));
145
146         ResponseEntity<GetOrchestrationResponse> response = restTemplate.exchange(builder.toUriString(), HttpMethod.GET,
147                 entity, GetOrchestrationResponse.class);
148
149         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
150         assertThat(response.getBody(),
151                 sameBeanAs(testResponse).ignoring("request.startTime").ignoring("request.requestStatus.finishTime"));
152         assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
153         assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
154         assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
155         assertEquals("7.0.0", response.getHeaders().get("X-LatestVersion").get(0));
156         assertEquals("00032ab7-3fb3-42e5-965d-8ea592502017", response.getHeaders().get("X-TransactionID").get(0));
157     }
158
159     @Test
160     public void testGetOrchestrationRequestNoRequestID() {
161         HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
162         headers.set("Accept", MediaType.APPLICATION_JSON);
163
164         UriComponentsBuilder builder = UriComponentsBuilder
165                 .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v6/"));
166
167         ResponseEntity<GetOrchestrationListResponse> response = restTemplate.exchange(builder.toUriString(),
168                 HttpMethod.GET, entity, GetOrchestrationListResponse.class);
169         assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
170     }
171
172     @Test
173     public void testGetOrchestrationRequestFilter() throws Exception {
174         setupTestGetOrchestrationRequestFilter();
175         List<String> values = new ArrayList<>();
176         values.add("EQUALS");
177         values.add("vfModule");
178         
179         ObjectMapper mapper = new ObjectMapper();
180         GetOrchestrationListResponse testResponse = mapper.readValue(new File("src/test/resources/OrchestrationRequest/OrchestrationFilterResponse.json"),
181                 GetOrchestrationListResponse.class);
182
183         Map<String, List<String>> orchestrationMap = new HashMap<>();
184         orchestrationMap.put("modelType", values);
185         List<GetOrchestrationResponse> testResponses = new ArrayList<>();
186
187         List<InfraActiveRequests> requests = requestsDbClient.getOrchestrationFiltersFromInfraActive(orchestrationMap);
188         HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
189         headers.set("Accept", MediaType.APPLICATION_JSON);
190
191         UriComponentsBuilder builder = UriComponentsBuilder
192                 .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v6?filter=modelType:EQUALS:vfModule"));
193
194         ResponseEntity<GetOrchestrationListResponse> response = restTemplate.exchange(builder.toUriString(),
195                 HttpMethod.GET, entity, GetOrchestrationListResponse.class);
196         assertThat(response.getBody(),
197                 sameBeanAs(testResponse).ignoring("requestList.request.startTime").ignoring("requestList.request.requestStatus.finishTime"));
198         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
199         assertEquals(requests.size(), response.getBody().getRequestList().size());
200         
201     }
202
203     @Test
204     public void testUnlockOrchestrationRequest() throws Exception {
205         setupTestUnlockOrchestrationRequest("0017f68c-eb2d-45bb-b7c7-ec31b37dc349", "UNLOCKED");
206         ObjectMapper mapper = new ObjectMapper();
207         mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
208         String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json")));
209
210         headers.set("Accept", MediaType.APPLICATION_JSON);
211         headers.set("Content-Type", MediaType.APPLICATION_JSON);
212         HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers);
213
214         UriComponentsBuilder builder;
215         ResponseEntity<String> response;
216         RequestError expectedRequestError;
217         RequestError actualRequestError;
218         ServiceException se;
219
220         // Test invalid JSON
221         expectedRequestError = new RequestError();
222         se = new ServiceException();
223         se.setMessageId(ErrorNumbers.SVC_DETAILED_SERVICE_ERROR);
224         se.setText("Orchestration RequestId 0017f68c-eb2d-45bb-b7c7-ec31b37dc349 has a status of UNLOCKED and can not be unlocked");
225         expectedRequestError.setServiceException(se);
226
227         builder = UriComponentsBuilder.fromHttpUrl(
228                 createURLWithPort("/onap/so/infra/orchestrationRequests/v6/0017f68c-eb2d-45bb-b7c7-ec31b37dc349/unlock"));
229
230         response = restTemplate.exchange(builder.toUriString(), HttpMethod.POST, entity, String.class);
231         actualRequestError = mapper.readValue(response.getBody(), RequestError.class);
232
233         assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
234         assertThat(actualRequestError, sameBeanAs(expectedRequestError));
235     }
236
237     @Test
238     public void testUnlockOrchestrationRequest_invalid_Json() throws Exception {
239         setupTestUnlockOrchestrationRequest_invalid_Json();
240         ObjectMapper mapper = new ObjectMapper();
241         mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
242         String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json")));
243
244         headers.set("Accept", MediaType.APPLICATION_JSON);
245         headers.set("Content-Type", MediaType.APPLICATION_JSON);
246         HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers);
247
248         UriComponentsBuilder builder;
249         ResponseEntity<String> response;
250         RequestError expectedRequestError;
251         RequestError actualRequestError;
252         ServiceException se;
253
254         // Test invalid requestId
255         expectedRequestError = new RequestError();
256         se = new ServiceException();
257         se.setMessageId(ErrorNumbers.SVC_DETAILED_SERVICE_ERROR);
258         se.setText("Null response from RequestDB when searching by RequestId");
259         expectedRequestError.setServiceException(se);
260
261         builder = UriComponentsBuilder.fromHttpUrl(
262                 createURLWithPort("/onap/so/infra/orchestrationRequests/v6/" + INVALID_REQUEST_ID + "/unlock"));
263
264         response = restTemplate.exchange(builder.toUriString(), HttpMethod.POST, entity, String.class);
265         actualRequestError = mapper.readValue(response.getBody(), RequestError.class);
266
267         assertEquals(Response.Status.NOT_FOUND.getStatusCode(), response.getStatusCode().value());
268         assertThat(actualRequestError, sameBeanAs(expectedRequestError));
269     }
270
271     @Test
272     public void testUnlockOrchestrationRequest_Valid_Status()
273             throws JsonParseException, JsonMappingException, IOException, ValidationException {
274         setupTestUnlockOrchestrationRequest_Valid_Status("5ffbabd6-b793-4377-a1ab-082670fbc7ac", "PENDING");
275         ObjectMapper mapper = new ObjectMapper();
276         String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json")));
277
278         headers.set("Accept", MediaType.APPLICATION_JSON);
279         headers.set("Content-Type", MediaType.APPLICATION_JSON);
280         HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers);
281
282         UriComponentsBuilder builder;
283         ResponseEntity<String> response;
284         Request request;
285
286         // Test valid status
287         request = ORCHESTRATION_LIST.getRequestList().get(1).getRequest();
288         builder = UriComponentsBuilder.fromHttpUrl(
289                 createURLWithPort("/onap/so/infra/orchestrationRequests/v7/" + "5ffbabd6-b793-4377-a1ab-082670fbc7ac" + "/unlock"));
290
291         response = restTemplate.exchange(builder.toUriString(), HttpMethod.POST, entity, String.class);
292         //Cannot assert anything further here, already have a wiremock in place which ensures that the post was properly called to update.
293     }
294
295     @Ignore //What is this testing?
296     @Test
297     public void testGetOrchestrationRequestRequestDetailsWhiteSpace() throws Exception {
298         InfraActiveRequests requests = new InfraActiveRequests();
299         requests.setAction("create");
300         requests.setRequestBody("  ");
301         requests.setRequestId("requestId");
302         requests.setRequestScope("service");
303         requests.setRequestType("createInstance");
304         ObjectMapper mapper = new ObjectMapper();
305         String json = mapper.writeValueAsString(requests);
306
307         requestsDbClient.save(requests);
308
309         headers.set("Accept", MediaType.APPLICATION_JSON);
310         headers.set("Content-Type", MediaType.APPLICATION_JSON);
311         HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
312
313         UriComponentsBuilder builder = UriComponentsBuilder
314                 .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v7/requestId"));
315
316         ResponseEntity<GetOrchestrationResponse> response = restTemplate.exchange(builder.toUriString(), HttpMethod.GET,
317                 entity, GetOrchestrationResponse.class);
318
319         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
320         assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
321         assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
322         assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
323         assertEquals("7.0.0", response.getHeaders().get("X-LatestVersion").get(0));
324         assertEquals("requestId", response.getHeaders().get("X-TransactionID").get(0));
325     }
326
327     @Ignore //What is this testing?
328     @Test
329     public void testGetOrchestrationRequestRequestDetailsAlaCarte() throws IOException {
330         InfraActiveRequests requests = new InfraActiveRequests();
331
332         String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/AlaCarteRequest.json")));
333
334         requests.setAction("create");
335         requests.setRequestBody(requestJSON);
336         requests.setRequestId("requestId");
337         requests.setRequestScope("service");
338         requests.setRequestType("createInstance");
339 //        iar.save(requests);
340
341         headers.set("Accept", MediaType.APPLICATION_JSON);
342         headers.set("Content-Type", MediaType.APPLICATION_JSON);
343         HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
344
345         UriComponentsBuilder builder = UriComponentsBuilder
346                 .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v7/requestId"));
347
348         ResponseEntity<GetOrchestrationResponse> response = restTemplate.exchange(builder.toUriString(), HttpMethod.GET,
349                 entity, GetOrchestrationResponse.class);
350
351         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
352         assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
353         assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
354         assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
355         assertEquals("7.0.0", response.getHeaders().get("X-LatestVersion").get(0));
356         assertEquals("requestId", response.getHeaders().get("X-TransactionID").get(0));
357     }
358     @Test
359     public void mapRequestProcessingDataTest() throws JsonParseException, JsonMappingException, IOException{
360         RequestProcessingData entry = new RequestProcessingData();
361         RequestProcessingData secondEntry = new RequestProcessingData();
362         List<HashMap<String, String>> expectedList = new ArrayList<>();
363         HashMap<String, String> expectedMap = new HashMap<>();
364         List<HashMap<String, String>> secondExpectedList = new ArrayList<>();
365         HashMap<String, String> secondExpectedMap = new HashMap<>();
366         List<RequestProcessingData> expectedDataList = new ArrayList<>();
367         entry.setGroupingId("7d2e8c07-4d10-456d-bddc-37abf38ca714");
368         entry.setTag("pincFabricConfigRequest");
369         expectedMap.put("requestAction", "assign");
370         expectedMap.put("pincFabricId", "testId");
371         expectedList.add(expectedMap);
372         entry.setDataPairs(expectedList);
373         secondEntry.setGroupingId("7d2e8c07-4d10-456d-bddc-37abf38ca715");
374         secondEntry.setTag("pincFabricConfig");
375         secondExpectedMap.put("requestAction", "unassign");
376         secondExpectedList.add(secondExpectedMap);
377         secondEntry.setDataPairs(secondExpectedList);
378         expectedDataList.add(entry);
379         expectedDataList.add(secondEntry);
380         
381         List<org.onap.so.db.request.beans.RequestProcessingData> processingData = new ArrayList<>(); 
382         List<RequestProcessingData> actualProcessingData = new ArrayList<>();
383         ObjectMapper mapper = new ObjectMapper();
384         processingData = mapper.readValue(new File("src/test/resources/OrchestrationRequest/RequestProcessingData.json"),
385                         new TypeReference<List<org.onap.so.db.request.beans.RequestProcessingData>>(){});
386         actualProcessingData = orchReq.mapRequestProcessingData(processingData);
387         assertThat(actualProcessingData,sameBeanAs(expectedDataList));
388     }
389
390     public void setupTestGetOrchestrationRequest() throws Exception{
391         //For testGetOrchestrationRequest
392         stubFor(any(urlPathEqualTo("/infraActiveRequests/00032ab7-na18-42e5-965d-8ea592502018")).willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
393                 .withBody(new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/getOrchestrationRequest.json"))))
394                 .withStatus(HttpStatus.SC_OK)));
395         stubFor(get(urlPathEqualTo("/requestProcessingData/search/findBySoRequestIdOrderByGroupingIdDesc/"))
396                         .withQueryParam("SO_REQUEST_ID", equalTo("00032ab7-na18-42e5-965d-8ea592502018"))
397                         .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
398                 .withBody(new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/getRequestProcessingData.json"))))
399                 .withStatus(HttpStatus.SC_OK)));
400     }
401
402     private void setupTestGetOrchestrationRequestRequestDetails(String requestId, String status) throws Exception{
403         stubFor(get(urlPathEqualTo(getTestUrl(requestId))).willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
404                 .withBody(new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/getOrchestrationRequestDetails.json"))))
405                 .withStatus(HttpStatus.SC_OK)));
406     }
407
408     private void setupTestUnlockOrchestrationRequest(String requestId, String status) {
409         stubFor(get(urlPathEqualTo(getTestUrl(requestId))).willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
410                 .withBody(String.format(getResponseTemplate, requestId, status))
411                 .withStatus(HttpStatus.SC_OK)));
412
413     }
414
415
416
417     private void setupTestUnlockOrchestrationRequest_invalid_Json() {
418         stubFor(get(urlPathEqualTo(getTestUrl(INVALID_REQUEST_ID))).willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
419                 .withStatus(HttpStatus.SC_NOT_FOUND)));
420
421     }
422
423     private void setupTestUnlockOrchestrationRequest_Valid_Status(String requestID, String status) {
424         stubFor(get(urlPathEqualTo(getTestUrl(requestID))).willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
425                 .withBody(String.format(getResponseTemplate, requestID, status))
426                 .withStatus(HttpStatus.SC_OK)));
427
428         stubFor(post(urlPathEqualTo(getTestUrl(""))).willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
429                 .withBody(String.format(infraActivePost, requestID))
430                 .withStatus(HttpStatus.SC_OK)));
431     }
432
433     private void setupTestGetOrchestrationRequestFilter() throws Exception{
434         //for testGetOrchestrationRequestFilter();
435         stubFor(any(urlPathEqualTo("/infraActiveRequests/getOrchestrationFiltersFromInfraActive/")).withRequestBody(equalToJson("{\"modelType\":[\"EQUALS\",\"vfModule\"]}")).willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
436                 .withBody(new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/getRequestDetailsFilter.json"))))
437                 .withStatus(HttpStatus.SC_OK)));
438     }
439 }