diff options
Diffstat (limited to 'bpmn/MSORESTClient')
13 files changed, 180 insertions, 1546 deletions
diff --git a/bpmn/MSORESTClient/pom.xml b/bpmn/MSORESTClient/pom.xml index 3c2ea83bb6..d2e294d5c0 100644 --- a/bpmn/MSORESTClient/pom.xml +++ b/bpmn/MSORESTClient/pom.xml @@ -2,22 +2,28 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - + <parent> <groupId>org.openecomp.mso</groupId> - <artifactId>bpmn</artifactId> + <artifactId>bpmn</artifactId> <version>1.1.0-SNAPSHOT</version> </parent> - + <groupId>org.openecomp.mso</groupId> <artifactId>MSORESTClient</artifactId> - + <packaging>jar</packaging> - + <name>MSO REST Client API</name> - + <dependencies> <dependency> + <groupId>org.evosuite</groupId> + <artifactId>evosuite-standalone-runtime</artifactId> + <version>${evosuiteVersion}</version> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpmime</artifactId> <version>4.5</version> @@ -27,33 +33,20 @@ <artifactId>json-rpc</artifactId> <version>1.0</version> </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> + <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <version>1.10.19</version> <scope>test</scope> </dependency> - </dependencies> - <build> - <finalName>MSORESTClient</finalName> - <plugins> - <!-- <plugin> - </plugin> --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.1</version> - <configuration> - <source>1.7</source> - <target>1.7</target> - </configuration> - </plugin> - </plugins> + </dependencies> + <build> + <finalName>MSORESTClient</finalName> + <plugins> + + </plugins> + </build> </project> diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java index 5c200046ca..cab3e5082e 100644 --- a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java +++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java @@ -91,7 +91,6 @@ public class RESTClient { private final LinkedHashMap<String, List<String>> parameters; private HttpEntity httpEntity; - private HttpClient unitTestClient; /** * Internal method used to build an APIResponse using the specified @@ -583,13 +582,6 @@ public class RESTClient { return httpEntity; } - public HttpClient getUnitTestClient() { - return unitTestClient; - } - - public void setUnitTestClient(HttpClient unitTestClient) { - this.unitTestClient = unitTestClient; - } /** * Allows inclusion of a request body with DELETE. diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java index 87a3f47cfe..e44a44d118 100644 --- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java +++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java @@ -3,6 +3,26 @@ * Mon Nov 14 11:46:25 GMT 2016 */ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.openecomp.mso.rest; import org.junit.Test; diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java index 59f09a0bc9..80915d74cf 100644 --- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java +++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java @@ -4,6 +4,26 @@ * Mon Nov 14 11:46:25 GMT 2016 */ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.openecomp.mso.rest; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java index 21043496db..f0aeee0f99 100644 --- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java +++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java @@ -3,6 +3,26 @@ * Mon Nov 14 11:47:07 GMT 2016 */ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.openecomp.mso.rest; import org.junit.Test; diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java index e59f7da9fb..0438c1fba6 100644 --- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java +++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java @@ -4,6 +4,26 @@ * Mon Nov 14 11:47:07 GMT 2016 */ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.openecomp.mso.rest; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTest.java deleted file mode 100644 index 1a9e05abd0..0000000000 --- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTest.java +++ /dev/null @@ -1,1068 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Mon Nov 14 11:49:09 GMT 2016 - */ - -package org.openecomp.mso.rest; - -import org.junit.Test; -import static org.junit.Assert.*; -import static org.evosuite.shaded.org.mockito.Mockito.*; -import static org.evosuite.runtime.MockitoExtension.*; -import static org.evosuite.runtime.EvoAssertions.*; - -import java.io.InputStream; -import java.util.LinkedHashMap; -import java.util.List; -import org.apache.http.Header; -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.StatusLine; -import org.apache.http.client.HttpClient; -import org.apache.http.entity.InputStreamEntity; -import org.evosuite.runtime.EvoRunner; -import org.evosuite.runtime.EvoRunnerParameters; -import org.evosuite.runtime.ViolatedAssumptionAnswer; -import org.junit.runner.RunWith; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class RESTClientESTest extends RESTClientESTestscaffolding { - - @Test(timeout = 4000) - public void test00() throws Throwable { - RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException"); - HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(httpClient0).toString(); - doReturn((HttpResponse) null).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class)); - rESTClient0.setUnitTestClient(httpClient0); - // Undeclared exception! - try { - rESTClient0.patch("<;xR"); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.rest.APIResponse", e); - } - } - - @Test(timeout = 4000) - public void test01() throws Throwable { - RESTConfig rESTConfig0 = mock(RESTConfig.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(rESTConfig0).getProxyHost(); - doReturn(0).when(rESTConfig0).getProxyPort(); - doReturn((String) null).when(rESTConfig0).getURL(); - RESTClient rESTClient0 = new RESTClient(rESTConfig0); - HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(httpClient0).toString(); - rESTClient0.setUnitTestClient(httpClient0); - HttpClient httpClient1 = rESTClient0.getUnitTestClient(); - assertSame(httpClient1, httpClient0); - } - - @Test(timeout = 4000) - public void test02() throws Throwable { - RESTClient rESTClient0 = new RESTClient((String) null, "Jhhlq!Y8o>CaA", (-3767)); - String string0 = rESTClient0.getURL(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test03() throws Throwable { - RESTConfig rESTConfig0 = new RESTConfig("", "=&http.request_sent=http.request_sent", 783, true); - RESTClient rESTClient0 = new RESTClient(rESTConfig0); - String string0 = rESTClient0.getURL(); - assertEquals("", string0); - } - - @Test(timeout = 4000) - public void test04() throws Throwable { - RESTClient rESTClient0 = new RESTClient("http"); - RESTClient rESTClient1 = rESTClient0.setParameter("http", "http"); - LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient1.getParameters(); - assertEquals(1, linkedHashMap0.size()); - } - - @Test(timeout = 4000) - public void test05() throws Throwable { - RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt"); - RESTClient rESTClient1 = rESTClient0.setHeader(",%LX:SC+'3!nt", ",[o<:aGQK"); - LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient1.getHeaders(); - assertEquals(1, linkedHashMap0.size()); - } - - @Test(timeout = 4000) - public void test06() throws Throwable { - RESTClient rESTClient0 = new RESTClient(""); - InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer()); - InputStreamEntity inputStreamEntity0 = new InputStreamEntity(inputStream0); - StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer()); - doReturn(0).when(statusLine0).getStatusCode(); - HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer()); - doReturn(inputStreamEntity0, (HttpEntity) null, (HttpEntity) null).when(httpResponse0).getEntity(); - doReturn(statusLine0).when(httpResponse0).getStatusLine(); - HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer()); - doReturn("Q[z^W").when(httpClient0).toString(); - doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class)); - rESTClient0.setUnitTestClient(httpClient0); - HttpClient httpClient1 = mock(HttpClient.class, new ViolatedAssumptionAnswer()); - // Undeclared exception! - try { - rESTClient0.post(); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Entity may not be null - // - verifyException("org.apache.http.util.Args", e); - } - } - - @Test(timeout = 4000) - public void test07() throws Throwable { - RESTClient rESTClient0 = new RESTClient(""); - RESTClient rESTClient1 = rESTClient0.setParameter((String) null, "7%d/ia+s(I~@<PK"); - // Undeclared exception! - try { - rESTClient1.post(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.net.URLEncoder", e); - } - } - - @Test(timeout = 4000) - public void test08() throws Throwable { - RESTConfig rESTConfig0 = mock(RESTConfig.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(rESTConfig0).getProxyHost(); - doReturn(0).when(rESTConfig0).getProxyPort(); - doReturn((String) null).when(rESTConfig0).getURL(); - RESTClient rESTClient0 = new RESTClient(rESTConfig0); - // Undeclared exception! - try { - rESTClient0.post(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - } - } - - @Test(timeout = 4000) - public void test09() throws Throwable { - RESTConfig rESTConfig0 = new RESTConfig("UTF-8"); - RESTClient rESTClient0 = new RESTClient(rESTConfig0); - RESTClient rESTClient1 = rESTClient0.addParameter((String) null, ""); - // Undeclared exception! - try { - rESTClient1.patch("DELETE"); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.net.URLEncoder", e); - } - } - - @Test(timeout = 4000) - public void test10() throws Throwable { - RESTClient rESTClient0 = new RESTClient("!{usNmLQ_Gt.C_98"); - // Undeclared exception! - try { - rESTClient0.patch("https"); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Illegal character in path at index 1: !{usNmLQ_Gt.C_98 - // - verifyException("java.net.URI", e); - } - } - - @Test(timeout = 4000) - public void test11() throws Throwable { - RESTClient rESTClient0 = new RESTClient(""); - rESTClient0.addParameter("", (String) null); - // Undeclared exception! - try { - rESTClient0.httpPut(""); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.net.URLEncoder", e); - } - } - - @Test(timeout = 4000) - public void test12() throws Throwable { - RESTClient rESTClient0 = new RESTClient("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/", (-697)); - // Undeclared exception! - try { - rESTClient0.httpPut(""); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Illegal character in path at index 11: szM4DVVoiAs`]T/ - // - verifyException("java.net.URI", e); - } - } - - @Test(timeout = 4000) - public void test13() throws Throwable { - RESTClient rESTClient0 = new RESTClient((String) null); - // Undeclared exception! - try { - rESTClient0.httpPost(" I3^~h5yoFuif"); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - } - } - - @Test(timeout = 4000) - public void test14() throws Throwable { - RESTConfig rESTConfig0 = new RESTConfig("&", false); - RESTClient rESTClient0 = new RESTClient(rESTConfig0); - rESTClient0.setHeader((String) null, "/G$0vW$R4vUaL)*tz"); - // Undeclared exception! - try { - rESTClient0.httpPost("/G$0vW$R4vUaL)*tz"); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Header name may not be null - // - verifyException("org.apache.http.util.Args", e); - } - } - - @Test(timeout = 4000) - public void test15() throws Throwable { - RESTClient rESTClient0 = new RESTClient("oO!CF58JhSCm6t"); - rESTClient0.addParameter((String) null, "oO!CF58JhSCm6t"); - // Undeclared exception! - try { - rESTClient0.httpPost(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.net.URLEncoder", e); - } - } - - @Test(timeout = 4000) - public void test16() throws Throwable { - RESTClient rESTClient0 = new RESTClient((String) null, "F(Oy=<SOmNE9", (-1932735280)); - // Undeclared exception! - try { - rESTClient0.httpPost(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - } - } - - @Test(timeout = 4000) - public void test17() throws Throwable { - RESTConfig rESTConfig0 = new RESTConfig("JAl/&Uq6mM8Kf8", false); - RESTClient rESTClient0 = new RESTClient(rESTConfig0); - // Undeclared exception! - try { - rESTClient0.httpPost(); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test18() throws Throwable { - RESTClient rESTClient0 = new RESTClient("&8jW\"", "&8jW\"", (-1)); - // Undeclared exception! - try { - rESTClient0.httpPost(); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Illegal character in path at index 0: &8jW\" - // - verifyException("java.net.URI", e); - } - } - - @Test(timeout = 4000) - public void test19() throws Throwable { - RESTClient rESTClient0 = new RESTClient(")7l9={q>0E4sV]T"); - RESTClient rESTClient1 = rESTClient0.addParameter((String) null, ")7l9={q>0E4sV]T"); - // Undeclared exception! - try { - rESTClient1.httpPatch((String) null); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.net.URLEncoder", e); - } - } - - @Test(timeout = 4000) - public void test20() throws Throwable { - RESTClient rESTClient0 = new RESTClient("[59t(J)"); - // Undeclared exception! - try { - rESTClient0.httpPatch("[59t(J)"); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Illegal character in path at index 0: [59t(J) - // - verifyException("java.net.URI", e); - } - } - - @Test(timeout = 4000) - public void test21() throws Throwable { - RESTClient rESTClient0 = new RESTClient("A29%23fZqv%7F*%405=%7F%7Frdbt-X%22DB%2FhCrUn", "=", (-1)); - HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(httpClient0).toString(); - doReturn((HttpResponse) null).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class)); - rESTClient0.setUnitTestClient(httpClient0); - // Undeclared exception! - try { - rESTClient0.httpGet(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.rest.APIResponse", e); - } - } - - @Test(timeout = 4000) - public void test22() throws Throwable { - RESTClient rESTClient0 = new RESTClient("*;R"); - // Undeclared exception! - try { - rESTClient0.httpGet(); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Illegal character in path at index 0: *;R - // - verifyException("java.net.URI", e); - } - } - - @Test(timeout = 4000) - public void test23() throws Throwable { - RESTClient rESTClient0 = new RESTClient("compatibility"); - RESTClient rESTClient1 = rESTClient0.addParameter("https", "https"); - RESTClient rESTClient2 = rESTClient1.setHeader("compatibility", "https"); - RESTClient rESTClient3 = rESTClient2.setParameter("4#'mD<\"jNh?>_vfI:]", "Char array buffer"); - InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer()); - InputStreamEntity inputStreamEntity0 = new InputStreamEntity(inputStream0); - StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer()); - doReturn(0).when(statusLine0).getStatusCode(); - rESTClient3.addHeader("2b?N", "https"); - HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer()); - doReturn(inputStreamEntity0, (HttpEntity) null, (HttpEntity) null).when(httpResponse0).getEntity(); - doReturn(statusLine0).when(httpResponse0).getStatusLine(); - HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer()); - doReturn("GiQ=eHBwH9zA4COa").when(httpClient0).toString(); - doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class)); - rESTClient2.setUnitTestClient(httpClient0); - // Undeclared exception! - try { - rESTClient3.httpDelete(""); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Entity may not be null - // - verifyException("org.apache.http.util.Args", e); - } - } - - @Test(timeout = 4000) - public void test24() throws Throwable { - RESTClient rESTClient0 = new RESTClient(")TZ;T]b%B[FkT4", "%y@{Wz}c3J-!m", 1772); - RESTClient rESTClient1 = rESTClient0.addParameter("$y*O^k0", (String) null); - // Undeclared exception! - try { - rESTClient1.httpDelete((String) null); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.net.URLEncoder", e); - } - } - - @Test(timeout = 4000) - public void test25() throws Throwable { - RESTClient rESTClient0 = new RESTClient("Length Required"); - // Undeclared exception! - try { - rESTClient0.httpDelete("Length Required"); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Illegal character in path at index 6: Length Required - // - verifyException("java.net.URI", e); - } - } - - @Test(timeout = 4000) - public void test26() throws Throwable { - RESTConfig rESTConfig0 = new RESTConfig("yhPl=c#;<s`V", false); - RESTClient rESTClient0 = new RESTClient(rESTConfig0); - rESTClient0.addParameter("yhPl=c#;<s`V", (String) null); - // Undeclared exception! - try { - rESTClient0.httpDelete(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.net.URLEncoder", e); - } - } - - @Test(timeout = 4000) - public void test27() throws Throwable { - RESTConfig rESTConfig0 = new RESTConfig("2cSq'/FF]W'K.S^k=<=", "2cSq'/FF]W'K.S^k=<=", 2605); - RESTClient rESTClient0 = new RESTClient(rESTConfig0); - // Undeclared exception! - try { - rESTClient0.httpDelete(); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Illegal character in path at index 8: 2cSq'/FF]W'K.S^k=<= - // - verifyException("java.net.URI", e); - } - } - - @Test(timeout = 4000) - public void test28() throws Throwable { - RESTClient rESTClient0 = new RESTClient(")7l9={q>0E4sV]T"); - RESTClient rESTClient1 = rESTClient0.addParameter((String) null, ")7l9={q>0E4sV]T"); - // Undeclared exception! - try { - rESTClient1.get(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.net.URLEncoder", e); - } - } - - @Test(timeout = 4000) - public void test29() throws Throwable { - RESTClient rESTClient0 = new RESTClient("z8UR?=)5pTtS]*"); - // Undeclared exception! - try { - rESTClient0.get(); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test30() throws Throwable { - RESTClient rESTClient0 = new RESTClient("JB<TRwDR@k.-C$=w3", "|N", 0); - // Undeclared exception! - try { - rESTClient0.get(); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Illegal character in path at index 2: JB<TRwDR@k.-C$=w3 - // - verifyException("java.net.URI", e); - } - } - - @Test(timeout = 4000) - public void test31() throws Throwable { - RESTClient rESTClient0 = new RESTClient("YoeLljo%3A%5C%3D=http", "http.protocol.element-charset", (-1908874351)); - RESTClient rESTClient1 = rESTClient0.setParameter("I/O exception (", (String) null); - // Undeclared exception! - try { - rESTClient1.delete(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.net.URLEncoder", e); - } - } - - @Test(timeout = 4000) - public void test32() throws Throwable { - RESTClient rESTClient0 = new RESTClient("\":VYxeR;PP]jO_[f'"); - // Undeclared exception! - try { - rESTClient0.delete(); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Illegal character in scheme name at index 0: \":VYxeR;PP]jO_[f' - // - verifyException("java.net.URI", e); - } - } - - @Test(timeout = 4000) - public void test33() throws Throwable { - RESTClient rESTClient0 = null; - try { - rESTClient0 = new RESTClient((RESTConfig) null); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.rest.RESTClient", e); - } - } - - @Test(timeout = 4000) - public void test34() throws Throwable { - RESTClient rESTClient0 = new RESTClient(""); - rESTClient0.addParameter("", ""); - // Undeclared exception! - try { - rESTClient0.httpPatch("lr"); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test35() throws Throwable { - RESTClient rESTClient0 = new RESTClient("", "netscape", 1); - // Undeclared exception! - try { - rESTClient0.httpPost(""); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test36() throws Throwable { - RESTConfig rESTConfig0 = new RESTConfig((String) null); - RESTClient rESTClient0 = new RESTClient(rESTConfig0); - // Undeclared exception! - try { - rESTClient0.httpGet(); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test37() throws Throwable { - RESTClient rESTClient0 = new RESTClient("K.7:dc=", "K.7:dc=", 0); - try { - rESTClient0.httpPost(); - fail("Expecting exception: Exception"); - - } catch(Exception e) { - // - // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: K.7:dc= - // - verifyException("org.openecomp.mso.rest.RESTClient", e); - } - } - - @Test(timeout = 4000) - public void test38() throws Throwable { - RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException=", "EWh2BZ[]:q+%4S#7K", (-1847)); - // Undeclared exception! - try { - rESTClient0.httpDelete(); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test39() throws Throwable { - RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt"); - String string0 = rESTClient0.getURL(); - assertEquals(",%LX:SC+'3!nt", string0); - } - - @Test(timeout = 4000) - public void test40() throws Throwable { - RESTClient rESTClient0 = new RESTClient("compatibility"); - InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer()); - doReturn((-3113)).when(inputStream0).read(any(byte[].class)); - HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer()); - StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer()); - doReturn(201).when(statusLine0).getStatusCode(); - HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer()); - doReturn(inputStream0).when(httpEntity1).getContent(); - doReturn(0L, (long)(-2116360694)).when(httpEntity1).getContentLength(); - HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer()); - doReturn(false).when(httpEntity2).isStreaming(); - HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer()); - doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity(); - doReturn(statusLine0).when(httpResponse0).getStatusLine(); - HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer()); - doReturn("GiQ=eHBwH9zA4COa").when(httpClient0).toString(); - doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class)); - rESTClient0.setUnitTestClient(httpClient0); - // Undeclared exception! - try { - rESTClient0.httpDelete(""); - fail("Expecting exception: IndexOutOfBoundsException"); - - } catch(IndexOutOfBoundsException e) { - // - // off: 0 len: -3113 b.length: 4096 - // - verifyException("org.apache.http.util.ByteArrayBuffer", e); - } - } - - @Test(timeout = 4000) - public void test41() throws Throwable { - RESTClient rESTClient0 = new RESTClient("compatibility"); - HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer()); - StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer()); - doReturn(201).when(statusLine0).getStatusCode(); - Header[] headerArray0 = new Header[0]; - HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer()); - doReturn((InputStream) null).when(httpEntity1).getContent(); - HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer()); - doReturn(false).when(httpEntity2).isStreaming(); - HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer()); - doReturn(headerArray0).when(httpResponse0).getAllHeaders(); - doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity(); - doReturn(statusLine0).when(httpResponse0).getStatusLine(); - HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer()); - doReturn("GiQ=eHBwH9zA4COa").when(httpClient0).toString(); - doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class)); - rESTClient0.setUnitTestClient(httpClient0); - APIResponse aPIResponse0 = rESTClient0.httpDelete(""); - assertEquals(201, aPIResponse0.getStatusCode()); - } - - @Test(timeout = 4000) - public void test42() throws Throwable { - RESTClient rESTClient0 = new RESTClient("wlq:6r"); - try { - rESTClient0.httpDelete("E"); - fail("Expecting exception: Exception"); - - } catch(Exception e) { - // - // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: wlq:6r - // - verifyException("org.openecomp.mso.rest.RESTClient", e); - } - } - - @Test(timeout = 4000) - public void test43() throws Throwable { - RESTClient rESTClient0 = new RESTClient(""); - // Undeclared exception! - try { - rESTClient0.httpPatch(""); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test44() throws Throwable { - RESTClient rESTClient0 = new RESTClient("DELETE"); - // Undeclared exception! - try { - rESTClient0.httpPatch((String) null); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test45() throws Throwable { - RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException"); - RESTClient rESTClient1 = rESTClient0.addParameter("DELETE", ""); - // Undeclared exception! - try { - rESTClient1.patch("<;xR"); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test46() throws Throwable { - RESTClient rESTClient0 = new RESTClient("compatibility"); - HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer()); - StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer()); - doReturn(201).when(statusLine0).getStatusCode(); - Header[] headerArray0 = new Header[0]; - HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer()); - doReturn((InputStream) null).when(httpEntity1).getContent(); - HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer()); - doReturn(false).when(httpEntity2).isStreaming(); - HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer()); - doReturn(headerArray0).when(httpResponse0).getAllHeaders(); - doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity(); - doReturn(statusLine0).when(httpResponse0).getStatusLine(); - HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer()); - doReturn("GiQ=eHBwH9zA4COa").when(httpClient0).toString(); - doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class)); - rESTClient0.setUnitTestClient(httpClient0); - APIResponse aPIResponse0 = rESTClient0.httpPut("compatibility"); - assertEquals(201, aPIResponse0.getStatusCode()); - } - - @Test(timeout = 4000) - public void test47() throws Throwable { - RESTClient rESTClient0 = new RESTClient(""); - // Undeclared exception! - try { - rESTClient0.httpPut(""); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test48() throws Throwable { - RESTClient rESTClient0 = new RESTClient("compatibility"); - rESTClient0.addParameter("https", "https"); - // Undeclared exception! - try { - rESTClient0.httpPut("compatibility"); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test49() throws Throwable { - RESTClient rESTClient0 = new RESTClient("", "(", 307); - // Undeclared exception! - try { - rESTClient0.httpPut((String) null); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test50() throws Throwable { - RESTClient rESTClient0 = new RESTClient("@0*Eu-=Fa"); - // Undeclared exception! - try { - rESTClient0.httpPost("@0*Eu-=Fa"); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test51() throws Throwable { - RESTClient rESTClient0 = new RESTClient("x"); - // Undeclared exception! - try { - rESTClient0.httpPost((String) null); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test52() throws Throwable { - RESTConfig rESTConfig0 = new RESTConfig("2cSq'/FF]W'K.S^k=<=", "2cSq'/FF]W'K.S^k=<=", 2605); - RESTClient rESTClient0 = new RESTClient(rESTConfig0); - RESTClient rESTClient1 = rESTClient0.setHeader("WkI<", "http"); - RESTClient rESTClient2 = rESTClient1.setHeader("WkI<", ""); - assertEquals("2cSq'/FF]W'K.S^k=<=", rESTClient2.getURL()); - } - - @Test(timeout = 4000) - public void test53() throws Throwable { - RESTClient rESTClient0 = new RESTClient("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/", (-697)); - RESTClient rESTClient1 = rESTClient0.setHeader("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/"); - RESTClient rESTClient2 = rESTClient1.addHeader("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/"); - assertSame(rESTClient0, rESTClient2); - } - - @Test(timeout = 4000) - public void test54() throws Throwable { - RESTClient rESTClient0 = new RESTClient("E U(~h|zVLWi", "http", 0); - rESTClient0.setParameter("E U(~h|zVLWi", "http"); - RESTClient rESTClient1 = rESTClient0.setParameter("E U(~h|zVLWi", "k@(}4U05'$}yl)W"); - assertSame(rESTClient1, rESTClient0); - } - - @Test(timeout = 4000) - public void test55() throws Throwable { - RESTClient rESTClient0 = new RESTClient(""); - RESTClient rESTClient1 = rESTClient0.addParameter("", ""); - RESTClient rESTClient2 = rESTClient0.addParameter("", (String) null); - assertSame(rESTClient2, rESTClient1); - } - - @Test(timeout = 4000) - public void test56() throws Throwable { - RESTClient rESTClient0 = new RESTClient("compatibility"); - rESTClient0.addParameter("https", "https"); - RESTClient rESTClient1 = rESTClient0.setParameter("4#'mD<\"jNh?>_vfI:]", "Char array buffer"); - // Undeclared exception! - try { - rESTClient1.httpDelete(""); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test57() throws Throwable { - RESTClient rESTClient0 = new RESTClient("K.7:dc="); - try { - rESTClient0.get(); - fail("Expecting exception: Exception"); - - } catch(Exception e) { - // - // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: K.7:dc= - // - verifyException("org.openecomp.mso.rest.RESTClient", e); - } - } - - @Test(timeout = 4000) - public void test58() throws Throwable { - RESTClient rESTClient0 = new RESTClient("http.virtual-host"); - RESTClient rESTClient1 = rESTClient0.addAuthorizationHeader("EWh2BZ[]:q+%4S#7K"); - assertSame(rESTClient0, rESTClient1); - } - - @Test(timeout = 4000) - public void test59() throws Throwable { - RESTClient rESTClient0 = new RESTClient("YoeLljo%3A%5C%3D=http", "http.protocol.element-charset", (-1908874351)); - // Undeclared exception! - try { - rESTClient0.delete(); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test60() throws Throwable { - RESTConfig rESTConfig0 = new RESTConfig("UTF-8"); - RESTClient rESTClient0 = new RESTClient(rESTConfig0); - HttpEntity httpEntity0 = rESTClient0.getHttpEntity(); - assertNull(httpEntity0); - } - - @Test(timeout = 4000) - public void test61() throws Throwable { - RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt"); - LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient0.getHeaders(); - assertEquals(0, linkedHashMap0.size()); - } - - @Test(timeout = 4000) - public void test62() throws Throwable { - RESTClient rESTClient0 = new RESTClient("DELETE"); - HttpClient httpClient0 = rESTClient0.getUnitTestClient(); - assertNull(httpClient0); - } - - @Test(timeout = 4000) - public void test63() throws Throwable { - RESTClient rESTClient0 = new RESTClient("A29%23fZqv%7F*%405=%7F%7Frdbt-X%22DB%2FhCrUn", "=", (-1)); - RESTClient rESTClient1 = rESTClient0.addParameter("o", "o"); - // Undeclared exception! - try { - rESTClient1.httpGet(); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test64() throws Throwable { - RESTClient rESTClient0 = new RESTClient("DELETE"); - LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient0.getParameters(); - assertTrue(linkedHashMap0.isEmpty()); - } - - @Test(timeout = 4000) - public void test65() throws Throwable { - RESTClient rESTClient0 = new RESTClient(""); - // Undeclared exception! - try { - rESTClient0.post(); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } - - @Test(timeout = 4000) - public void test66() throws Throwable { - RESTClient rESTClient0 = new RESTClient("DELETE"); - // Undeclared exception! - try { - rESTClient0.httpDelete((String) null); - fail("Expecting exception: IllegalStateException"); - - } catch(IllegalStateException e) { - // - // Target host is null - // - verifyException("org.apache.http.util.Asserts", e); - } - } -} diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTestscaffolding.java deleted file mode 100644 index 2761b252fd..0000000000 --- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTestscaffolding.java +++ /dev/null @@ -1,366 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Mon Nov 14 11:49:09 GMT 2016 - */ - -package org.openecomp.mso.rest; - -import org.evosuite.runtime.annotation.EvoSuiteClassExclude; -import org.junit.BeforeClass; -import org.junit.Before; -import org.junit.After; -import org.junit.AfterClass; -import org.evosuite.runtime.sandbox.Sandbox; - -@EvoSuiteClassExclude -public class RESTClientESTestscaffolding { - - @org.junit.Rule - public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); - - private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); - - private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); - - @BeforeClass - public static void initEvoSuiteFramework() { - org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.RESTClient"; - org.evosuite.runtime.GuiSupport.initialize(); - org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; - org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; - org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; - org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; - org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); - org.evosuite.runtime.classhandling.JDKClassResetter.init(); - initializeClasses(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - } - - @AfterClass - public static void clearEvoSuiteFramework(){ - Sandbox.resetDefaultSecurityManager(); - java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); - } - - @Before - public void initTestCase(){ - threadStopper.storeCurrentThreads(); - threadStopper.startRecordingTime(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); - org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); - - org.evosuite.runtime.GuiSupport.setHeadless(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - org.evosuite.runtime.agent.InstrumentingAgent.activate(); - } - - @After - public void doneWithTestCase(){ - threadStopper.killAndJoinClientThreads(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); - org.evosuite.runtime.classhandling.JDKClassResetter.reset(); - resetClasses(); - org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); - org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); - org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); - } - - - private static void initializeClasses() { - org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RESTClientESTestscaffolding.class.getClassLoader() , - "org.apache.http.client.methods.HttpPatch", - "org.apache.http.io.HttpMessageParserFactory", - "org.apache.http.impl.conn.DefaultHttpResponseParserFactory", - "org.apache.http.impl.execchain.RequestAbortedException", - "org.apache.http.impl.execchain.ProtocolExec", - "org.apache.http.config.Registry", - "org.apache.http.cookie.MalformedCookieException", - "org.apache.http.impl.conn.SystemDefaultDnsResolver", - "org.apache.http.client.protocol.RequestClientConnControl", - "org.apache.http.conn.ConnectionRequest", - "org.apache.http.impl.client.DefaultUserTokenHandler", - "org.apache.http.impl.conn.DefaultManagedHttpClientConnection", - "org.apache.http.conn.HttpClientConnectionManager", - "org.apache.http.client.protocol.RequestAcceptEncoding", - "org.apache.http.HttpException", - "org.apache.http.cookie.CookieSpec", - "org.apache.http.impl.cookie.RFC2965SpecFactory", - "org.apache.http.pool.AbstractConnPool$1", - "org.apache.http.conn.ssl.AllowAllHostnameVerifier", - "org.apache.http.client.CredentialsProvider", - "org.apache.http.client.ClientProtocolException", - "org.apache.http.pool.RouteSpecificPool", - "org.apache.http.client.methods.Configurable", - "org.apache.http.config.RegistryBuilder", - "org.apache.http.params.AbstractHttpParams", - "org.apache.http.io.HttpTransportMetrics", - "org.apache.http.conn.ssl.AbstractVerifier", - "org.openecomp.mso.rest.RESTConfig", - "org.apache.http.auth.Credentials", - "org.apache.http.io.HttpMessageParser", - "org.apache.http.client.methods.AbstractExecutionAwareRequest", - "org.apache.http.impl.BHttpConnectionBase", - "org.apache.http.HttpConnectionMetrics", - "org.apache.http.io.HttpMessageWriter", - "org.apache.http.HttpClientConnection", - "org.apache.http.conn.ConnectionPoolTimeoutException", - "org.apache.http.conn.routing.HttpRouteDirector", - "org.apache.http.pool.ConnPool", - "org.apache.http.protocol.HttpProcessor", - "org.apache.http.auth.AuthProtocolState", - "org.apache.http.client.RedirectStrategy", - "org.apache.http.impl.client.BasicCookieStore", - "org.apache.http.conn.routing.BasicRouteDirector", - "org.apache.http.protocol.HttpContext", - "org.apache.http.params.HttpParams", - "org.apache.http.client.NonRepeatableRequestException", - "org.apache.http.HttpResponse", - "org.apache.http.impl.client.AuthenticationStrategyImpl", - "org.apache.http.impl.client.HttpClientBuilder", - "org.apache.http.message.HeaderGroup", - "org.apache.http.impl.io.DefaultHttpRequestWriterFactory", - "org.apache.http.client.protocol.RequestAuthCache", - "org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory", - "org.apache.http.impl.conn.DefaultSchemePortResolver", - "org.apache.http.config.MessageConstraints", - "org.apache.http.Header", - "org.apache.http.conn.HttpHostConnectException", - "org.apache.http.util.EntityUtils", - "org.apache.http.impl.NoConnectionReuseStrategy", - "org.apache.http.impl.client.BasicCredentialsProvider", - "org.apache.http.conn.ConnectionKeepAliveStrategy", - "org.apache.http.cookie.CookieSpecFactory", - "org.apache.http.conn.ssl.X509HostnameVerifier", - "org.apache.http.protocol.ChainBuilder", - "org.apache.http.impl.client.DefaultHttpRequestRetryHandler", - "org.apache.http.impl.conn.PoolingHttpClientConnectionManager", - "org.apache.http.impl.conn.DefaultProxyRoutePlanner", - "org.apache.http.impl.auth.KerberosSchemeFactory", - "org.apache.http.util.ByteArrayBuffer", - "org.apache.http.cookie.CookieOrigin", - "org.apache.http.client.methods.HttpRequestBase", - "org.apache.http.HttpEntity", - "org.apache.http.pool.PoolEntryCallback", - "org.apache.http.entity.StringEntity", - "org.apache.http.impl.DefaultConnectionReuseStrategy", - "org.apache.http.pool.ConnFactory", - "org.apache.http.client.methods.HttpGet", - "org.apache.http.protocol.BasicHttpContext", - "org.apache.commons.logging.impl.Jdk14Logger", - "org.apache.http.impl.execchain.ClientExecChain", - "org.apache.http.HttpVersion", - "org.apache.http.conn.SchemePortResolver", - "org.apache.http.message.BasicStatusLine", - "org.apache.http.conn.DnsResolver", - "org.apache.http.impl.client.TargetAuthenticationStrategy", - "org.apache.http.params.CoreProtocolPNames", - "org.apache.http.auth.AuthScheme", - "org.apache.http.message.AbstractHttpMessage", - "org.apache.http.auth.MalformedChallengeException", - "org.apache.http.HttpEntityEnclosingRequest", - "org.apache.http.entity.AbstractHttpEntity", - "org.apache.http.ReasonPhraseCatalog", - "org.apache.http.impl.cookie.BrowserCompatSpecFactory$SecurityLevel", - "org.apache.http.client.UserTokenHandler", - "org.apache.http.impl.auth.DigestSchemeFactory", - "org.apache.http.impl.conn.HttpClientConnectionOperator", - "org.apache.http.HttpResponseFactory", - "org.apache.http.client.methods.HttpPut", - "org.openecomp.mso.rest.RESTClient", - "org.apache.http.ConnectionReuseStrategy", - "org.apache.http.client.protocol.RequestDefaultHeaders", - "org.apache.http.message.BasicHeader", - "org.apache.http.impl.conn.ConnectionShutdownException", - "org.apache.http.conn.ManagedHttpClientConnection", - "org.apache.http.client.protocol.ResponseContentEncoding", - "org.apache.http.message.BasicLineParser", - "org.apache.http.client.methods.HttpPost", - "org.apache.http.auth.AuthSchemeProvider", - "org.apache.http.config.SocketConfig", - "org.apache.http.util.Asserts", - "org.apache.http.client.config.RequestConfig", - "org.apache.http.StatusLine", - "org.apache.http.impl.DefaultBHttpClientConnection", - "org.apache.http.impl.DefaultHttpResponseFactory", - "org.apache.http.io.SessionOutputBuffer", - "org.apache.http.RequestLine", - "org.apache.http.conn.HttpConnectionFactory", - "org.apache.http.protocol.RequestContent", - "org.apache.http.cookie.CookieIdentityComparator", - "org.apache.http.config.Lookup", - "org.apache.http.HttpMessage", - "org.apache.http.impl.cookie.NetscapeDraftSpecFactory", - "org.apache.http.HttpRequestInterceptor", - "org.apache.http.HeaderElementIterator", - "org.apache.http.client.AuthCache", - "org.apache.http.pool.AbstractConnPool", - "org.apache.http.HeaderIterator", - "org.apache.http.conn.ClientConnectionManager", - "org.apache.http.HttpInetConnection", - "org.apache.http.entity.ContentType", - "org.apache.http.message.LineFormatter", - "org.apache.http.cookie.CookieSpecProvider", - "org.apache.http.HttpRequest", - "org.apache.http.pool.ConnPoolControl", - "org.openecomp.mso.rest.APIResponse", - "org.apache.http.client.BackoffManager", - "org.openecomp.mso.rest.HostNameVerifier", - "org.apache.http.client.AuthenticationStrategy", - "org.apache.http.conn.socket.ConnectionSocketFactory", - "org.apache.http.protocol.RequestTargetHost", - "org.apache.http.pool.PoolEntry", - "org.apache.http.message.BasicLineFormatter", - "org.apache.http.client.methods.HttpUriRequest", - "org.apache.http.protocol.HttpRequestExecutor", - "org.apache.http.client.methods.HttpRequestWrapper", - "org.apache.http.io.SessionInputBuffer", - "org.apache.http.impl.cookie.IgnoreSpecFactory", - "org.apache.http.impl.auth.HttpAuthenticator", - "org.apache.http.impl.conn.ManagedHttpClientConnectionFactory", - "org.apache.http.conn.ConnectTimeoutException", - "org.apache.http.client.methods.AbortableHttpRequest", - "org.apache.http.client.HttpClient", - "org.apache.http.auth.AuthSchemeFactory", - "org.apache.http.cookie.Cookie", - "org.apache.http.protocol.ImmutableHttpProcessor", - "org.apache.http.impl.auth.SPNegoSchemeFactory", - "org.apache.http.protocol.HTTP", - "org.apache.http.impl.conn.PoolingHttpClientConnectionManager$ConfigData", - "org.openecomp.mso.rest.RESTClient$HttpDeleteWithBody", - "org.apache.http.TokenIterator", - "org.openecomp.mso.rest.HttpHeader", - "org.apache.http.client.methods.HttpRequestWrapper$HttpEntityEnclosingRequestWrapper", - "org.apache.http.protocol.HttpCoreContext", - "org.apache.http.impl.conn.CPool", - "org.apache.http.impl.auth.NTLMSchemeFactory", - "org.apache.http.client.utils.URIUtils", - "org.apache.http.ProtocolVersion", - "org.apache.http.client.protocol.RequestExpectContinue", - "org.apache.http.util.VersionInfo", - "org.apache.http.impl.cookie.RFC2109SpecFactory", - "org.apache.http.entity.InputStreamEntity", - "org.apache.http.HttpHost", - "org.apache.http.conn.UnsupportedSchemeException", - "org.apache.http.ProtocolException", - "org.apache.http.impl.cookie.BrowserCompatSpecFactory", - "org.apache.http.client.methods.HttpEntityEnclosingRequestBase", - "org.apache.http.params.BasicHttpParams", - "org.apache.http.client.protocol.HttpClientContext", - "org.apache.http.impl.client.ProxyAuthenticationStrategy", - "org.apache.http.conn.ssl.StrictHostnameVerifier", - "org.apache.http.io.HttpMessageWriterFactory", - "org.apache.http.concurrent.Cancellable", - "org.apache.http.impl.execchain.MainClientExec", - "org.apache.http.protocol.HttpProcessorBuilder", - "org.apache.http.entity.ContentLengthStrategy", - "org.apache.http.impl.execchain.TunnelRefusedException", - "org.apache.http.conn.routing.HttpRoutePlanner", - "org.apache.http.Consts", - "org.apache.http.conn.ssl.SSLConnectionSocketFactory", - "org.apache.http.message.LineParser", - "org.apache.http.impl.cookie.BestMatchSpecFactory", - "org.apache.http.params.HttpParamsNames", - "org.apache.http.conn.ssl.SSLInitializationException", - "org.openecomp.mso.rest.RESTException", - "org.apache.http.util.Args", - "org.apache.http.params.HttpProtocolParams", - "org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy", - "org.apache.http.protocol.RequestUserAgent", - "org.apache.http.config.ConnectionConfig", - "org.apache.http.conn.socket.LayeredConnectionSocketFactory", - "org.apache.http.conn.ssl.BrowserCompatHostnameVerifier", - "org.apache.http.util.TextUtils", - "org.apache.http.HttpResponseInterceptor", - "org.apache.http.impl.EnglishReasonPhraseCatalog", - "org.apache.http.client.config.RequestConfig$Builder", - "org.apache.http.auth.AuthenticationException", - "org.apache.http.auth.AuthState", - "org.apache.http.client.protocol.RequestAddCookies", - "org.apache.http.impl.conn.DefaultRoutePlanner", - "org.apache.http.conn.routing.HttpRoute", - "org.apache.http.impl.conn.CPoolEntry", - "org.apache.http.client.CookieStore", - "org.apache.http.impl.auth.BasicSchemeFactory", - "org.apache.http.conn.socket.PlainConnectionSocketFactory", - "org.apache.http.client.HttpRequestRetryHandler", - "org.apache.http.ParseException", - "org.apache.http.impl.client.CloseableHttpClient", - "org.apache.http.client.protocol.ResponseProcessCookies", - "org.apache.http.message.BasicRequestLine", - "org.apache.http.client.ServiceUnavailableRetryStrategy", - "org.apache.http.client.methods.HttpExecutionAware", - "org.apache.http.impl.client.InternalHttpClient", - "org.apache.http.HeaderElement", - "org.apache.http.client.ConnectionBackoffStrategy", - "org.apache.http.util.CharArrayBuffer", - "org.apache.http.impl.execchain.RetryExec", - "org.apache.http.conn.routing.RouteInfo", - "org.apache.http.client.ResponseHandler", - "org.apache.http.HttpConnection", - "org.apache.http.message.ParserCursor" - ); - } - - private static void resetClasses() { - org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RESTClientESTestscaffolding.class.getClassLoader()); - - org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( - "org.openecomp.mso.rest.RESTClient$HttpDeleteWithBody", - "org.apache.http.conn.socket.PlainConnectionSocketFactory", - "org.apache.http.conn.ssl.AbstractVerifier", - "org.apache.commons.logging.impl.Jdk14Logger", - "org.apache.http.conn.ssl.SSLConnectionSocketFactory", - "org.apache.http.impl.conn.CPool", - "org.apache.http.message.BasicLineFormatter", - "org.apache.http.impl.io.DefaultHttpRequestWriterFactory", - "org.apache.http.ProtocolVersion", - "org.apache.http.HttpVersion", - "org.apache.http.message.BasicLineParser", - "org.apache.http.impl.EnglishReasonPhraseCatalog", - "org.apache.http.impl.DefaultHttpResponseFactory", - "org.apache.http.impl.conn.DefaultHttpResponseParserFactory", - "org.apache.http.impl.conn.ManagedHttpClientConnectionFactory", - "org.apache.http.impl.conn.HttpClientConnectionOperator", - "org.apache.http.impl.conn.DefaultSchemePortResolver", - "org.apache.http.impl.conn.SystemDefaultDnsResolver", - "org.apache.http.util.VersionInfo", - "org.apache.http.impl.client.HttpClientBuilder", - "org.apache.http.protocol.HttpRequestExecutor", - "org.apache.http.impl.DefaultConnectionReuseStrategy", - "org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy", - "org.apache.http.impl.client.AuthenticationStrategyImpl", - "org.apache.http.impl.client.TargetAuthenticationStrategy", - "org.apache.http.impl.client.ProxyAuthenticationStrategy", - "org.apache.http.impl.client.DefaultUserTokenHandler", - "org.apache.http.client.protocol.RequestClientConnControl", - "org.apache.http.client.protocol.ResponseContentEncoding", - "org.apache.http.impl.client.DefaultHttpRequestRetryHandler", - "org.apache.http.impl.cookie.BrowserCompatSpecFactory$SecurityLevel", - "org.apache.http.impl.client.BasicCookieStore", - "org.apache.http.cookie.CookieIdentityComparator", - "org.apache.http.client.config.RequestConfig", - "org.apache.http.client.methods.HttpPut", - "org.apache.http.message.HeaderGroup", - "org.apache.http.message.BasicHeader", - "org.apache.http.entity.AbstractHttpEntity", - "org.apache.http.Consts", - "org.apache.http.entity.ContentType", - "org.apache.http.util.CharArrayBuffer", - "org.apache.http.params.BasicHttpParams", - "org.apache.http.message.BasicRequestLine", - "org.apache.http.protocol.HttpCoreContext", - "org.apache.http.client.protocol.HttpClientContext", - "org.apache.http.auth.AuthProtocolState", - "org.apache.http.client.methods.HttpPost", - "org.apache.http.HttpHost", - "org.apache.http.client.methods.HttpGet", - "org.apache.http.client.methods.HttpPatch", - "org.openecomp.mso.rest.RESTException", - "org.apache.http.client.ClientProtocolException", - "org.apache.http.protocol.HTTP", - "org.apache.http.message.BasicStatusLine", - "org.apache.http.util.ByteArrayBuffer" - ); - } -} diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientTest.java deleted file mode 100644 index a1c83ba70e..0000000000 --- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.mso.rest; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import java.io.IOException; - -import org.apache.http.HttpResponse; -import org.apache.http.HttpVersion; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.entity.StringEntity; -import org.apache.http.message.BasicHttpResponse; -import org.junit.Assert; -import org.junit.Test; -import org.mockito.Mockito; - -import org.openecomp.mso.rest.APIResponse; -import org.openecomp.mso.rest.RESTClient; -import org.openecomp.mso.rest.RESTException; - -/** - * @version 1.0 - * - */ -public class RESTClientTest { - - @Test - public void testSimpleHTTP() throws RESTException, ClientProtocolException, IOException { - HttpClient mockHttpClient = mock(HttpClient.class); - HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK"); - response.setEntity(new StringEntity("test","UTF-8")); - when(mockHttpClient.execute(Mockito.<HttpUriRequest>any())).thenReturn(response); - - RESTClient restClient = new RESTClient("http://localhost"); - restClient.setUnitTestClient(mockHttpClient); - APIResponse apiResponse = restClient.get(); - Assert.assertEquals(200, apiResponse.getStatusCode()); - Assert.assertEquals("test", apiResponse.getResponseBodyAsString()); - } - - @Test - public void testSimpleHTTPS() throws RESTException, ClientProtocolException, IOException { - HttpClient mockHttpClient = mock(HttpClient.class); - HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK"); - response.setEntity(new StringEntity("test","UTF-8")); - when(mockHttpClient.execute(Mockito.<HttpUriRequest>any())).thenReturn(response); - - RESTClient restClient = new RESTClient("https://localhost"); - restClient.setUnitTestClient(mockHttpClient); - APIResponse apiResponse = restClient.get(); - Assert.assertEquals(200, apiResponse.getStatusCode()); - Assert.assertEquals("test", apiResponse.getResponseBodyAsString()); - } - -} diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java index 0a46cebf29..bb7460dfc6 100644 --- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java +++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java @@ -3,6 +3,26 @@ * Mon Nov 14 11:47:42 GMT 2016 */ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.openecomp.mso.rest; import org.junit.Test; diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java index 1eb33ddd80..1fabc6bc5d 100644 --- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java +++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java @@ -4,6 +4,26 @@ * Mon Nov 14 11:47:42 GMT 2016 */ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.openecomp.mso.rest; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java index aff908ee98..e4ac23b3bd 100644 --- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java +++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java @@ -3,6 +3,26 @@ * Mon Nov 14 11:47:59 GMT 2016 */ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.openecomp.mso.rest; import org.junit.Test; diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java index 13d4dcc026..3e3c9873b7 100644 --- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java +++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java @@ -4,6 +4,26 @@ * Mon Nov 14 11:47:59 GMT 2016 */ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.openecomp.mso.rest; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; |