2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.mso.apihandlerinfra;
23 import static org.junit.Assert.assertTrue;
25 import javax.ws.rs.core.Response;
26 import javax.ws.rs.core.UriInfo;
28 import org.junit.Test;
29 import org.mockito.Mockito;
31 public class OrchestrationRequestsTest {
33 OrchestrationRequests req = new OrchestrationRequests();
36 public void getOrchestrationRequestTest(){
37 Response resp = req.getOrchestrationRequest("1001", "v3");
38 assertTrue(resp.getEntity().toString() != null);
42 public void getE2EServiceInstancesTest(){
43 Response resp = req.getE2EServiceInstances("1001", "v3","599934");
44 assertTrue(resp.getEntity().toString() != null);
48 public void getOrchestrationRequest2Test(){
49 UriInfo uriInfo = Mockito.mock(UriInfo.class);
50 Response resp = req.getOrchestrationRequest(uriInfo, "v3");
51 assertTrue(resp.getEntity().toString() != null);
55 public void unlockOrchestrationRequestTest(){
56 Response resp = req.unlockOrchestrationRequest("{\"result\":\"success\"}","1001", "v3");
57 assertTrue(resp.getEntity().toString() != null);