Initial OpenECOMP MSO commit
[so.git] / bpmn / MSORESTClient / src / test / java / org / openecomp / mso / rest / RESTClientESTest.java
1 /*
2  * This file was automatically generated by EvoSuite
3  * Mon Nov 14 11:49:09 GMT 2016
4  */
5
6 package org.openecomp.mso.rest;
7
8 import org.junit.Test;
9 import static org.junit.Assert.*;
10 import static org.evosuite.shaded.org.mockito.Mockito.*;
11 import static org.evosuite.runtime.MockitoExtension.*;
12 import static org.evosuite.runtime.EvoAssertions.*;
13
14 import java.io.InputStream;
15 import java.util.LinkedHashMap;
16 import java.util.List;
17 import org.apache.http.Header;
18 import org.apache.http.HttpEntity;
19 import org.apache.http.HttpResponse;
20 import org.apache.http.StatusLine;
21 import org.apache.http.client.HttpClient;
22 import org.apache.http.entity.InputStreamEntity;
23 import org.evosuite.runtime.EvoRunner;
24 import org.evosuite.runtime.EvoRunnerParameters;
25 import org.evosuite.runtime.ViolatedAssumptionAnswer;
26 import org.junit.runner.RunWith;
27
28 @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
29 public class RESTClientESTest extends RESTClientESTestscaffolding {
30
31   @Test(timeout = 4000)
32   public void test00()  throws Throwable  {
33       RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException");
34       HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
35       doReturn((String) null).when(httpClient0).toString();
36       doReturn((HttpResponse) null).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
37       rESTClient0.setUnitTestClient(httpClient0);
38       // Undeclared exception!
39       try { 
40         rESTClient0.patch("<;xR");
41         fail("Expecting exception: NullPointerException");
42       
43       } catch(NullPointerException e) {
44          //
45          // no message in exception (getMessage() returned null)
46          //
47          verifyException("org.openecomp.mso.rest.APIResponse", e);
48       }
49   }
50
51   @Test(timeout = 4000)
52   public void test01()  throws Throwable  {
53       RESTConfig rESTConfig0 = mock(RESTConfig.class, new ViolatedAssumptionAnswer());
54       doReturn((String) null).when(rESTConfig0).getProxyHost();
55       doReturn(0).when(rESTConfig0).getProxyPort();
56       doReturn((String) null).when(rESTConfig0).getURL();
57       RESTClient rESTClient0 = new RESTClient(rESTConfig0);
58       HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
59       doReturn((String) null).when(httpClient0).toString();
60       rESTClient0.setUnitTestClient(httpClient0);
61       HttpClient httpClient1 = rESTClient0.getUnitTestClient();
62       assertSame(httpClient1, httpClient0);
63   }
64
65   @Test(timeout = 4000)
66   public void test02()  throws Throwable  {
67       RESTClient rESTClient0 = new RESTClient((String) null, "Jhhlq!Y8o>CaA", (-3767));
68       String string0 = rESTClient0.getURL();
69       assertNull(string0);
70   }
71
72   @Test(timeout = 4000)
73   public void test03()  throws Throwable  {
74       RESTConfig rESTConfig0 = new RESTConfig("", "=&http.request_sent=http.request_sent", 783, true);
75       RESTClient rESTClient0 = new RESTClient(rESTConfig0);
76       String string0 = rESTClient0.getURL();
77       assertEquals("", string0);
78   }
79
80   @Test(timeout = 4000)
81   public void test04()  throws Throwable  {
82       RESTClient rESTClient0 = new RESTClient("http");
83       RESTClient rESTClient1 = rESTClient0.setParameter("http", "http");
84       LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient1.getParameters();
85       assertEquals(1, linkedHashMap0.size());
86   }
87
88   @Test(timeout = 4000)
89   public void test05()  throws Throwable  {
90       RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt");
91       RESTClient rESTClient1 = rESTClient0.setHeader(",%LX:SC+'3!nt", ",[o<:aGQK");
92       LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient1.getHeaders();
93       assertEquals(1, linkedHashMap0.size());
94   }
95
96   @Test(timeout = 4000)
97   public void test06()  throws Throwable  {
98       RESTClient rESTClient0 = new RESTClient("");
99       InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer());
100       InputStreamEntity inputStreamEntity0 = new InputStreamEntity(inputStream0);
101       StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
102       doReturn(0).when(statusLine0).getStatusCode();
103       HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
104       doReturn(inputStreamEntity0, (HttpEntity) null, (HttpEntity) null).when(httpResponse0).getEntity();
105       doReturn(statusLine0).when(httpResponse0).getStatusLine();
106       HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
107       doReturn("Q[z^W").when(httpClient0).toString();
108       doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
109       rESTClient0.setUnitTestClient(httpClient0);
110       HttpClient httpClient1 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
111       // Undeclared exception!
112       try { 
113         rESTClient0.post();
114         fail("Expecting exception: IllegalArgumentException");
115       
116       } catch(IllegalArgumentException e) {
117          //
118          // Entity may not be null
119          //
120          verifyException("org.apache.http.util.Args", e);
121       }
122   }
123
124   @Test(timeout = 4000)
125   public void test07()  throws Throwable  {
126       RESTClient rESTClient0 = new RESTClient("");
127       RESTClient rESTClient1 = rESTClient0.setParameter((String) null, "7%d/ia+s(I~@<PK");
128       // Undeclared exception!
129       try { 
130         rESTClient1.post();
131         fail("Expecting exception: NullPointerException");
132       
133       } catch(NullPointerException e) {
134          //
135          // no message in exception (getMessage() returned null)
136          //
137          verifyException("java.net.URLEncoder", e);
138       }
139   }
140
141   @Test(timeout = 4000)
142   public void test08()  throws Throwable  {
143       RESTConfig rESTConfig0 = mock(RESTConfig.class, new ViolatedAssumptionAnswer());
144       doReturn((String) null).when(rESTConfig0).getProxyHost();
145       doReturn(0).when(rESTConfig0).getProxyPort();
146       doReturn((String) null).when(rESTConfig0).getURL();
147       RESTClient rESTClient0 = new RESTClient(rESTConfig0);
148       // Undeclared exception!
149       try { 
150         rESTClient0.post();
151         fail("Expecting exception: NullPointerException");
152       
153       } catch(NullPointerException e) {
154          //
155          // no message in exception (getMessage() returned null)
156          //
157       }
158   }
159
160   @Test(timeout = 4000)
161   public void test09()  throws Throwable  {
162       RESTConfig rESTConfig0 = new RESTConfig("UTF-8");
163       RESTClient rESTClient0 = new RESTClient(rESTConfig0);
164       RESTClient rESTClient1 = rESTClient0.addParameter((String) null, "");
165       // Undeclared exception!
166       try { 
167         rESTClient1.patch("DELETE");
168         fail("Expecting exception: NullPointerException");
169       
170       } catch(NullPointerException e) {
171          //
172          // no message in exception (getMessage() returned null)
173          //
174          verifyException("java.net.URLEncoder", e);
175       }
176   }
177
178   @Test(timeout = 4000)
179   public void test10()  throws Throwable  {
180       RESTClient rESTClient0 = new RESTClient("!{usNmLQ_Gt.C_98");
181       // Undeclared exception!
182       try { 
183         rESTClient0.patch("https");
184         fail("Expecting exception: IllegalArgumentException");
185       
186       } catch(IllegalArgumentException e) {
187          //
188          // Illegal character in path at index 1: !{usNmLQ_Gt.C_98
189          //
190          verifyException("java.net.URI", e);
191       }
192   }
193
194   @Test(timeout = 4000)
195   public void test11()  throws Throwable  {
196       RESTClient rESTClient0 = new RESTClient("");
197       rESTClient0.addParameter("", (String) null);
198       // Undeclared exception!
199       try { 
200         rESTClient0.httpPut("");
201         fail("Expecting exception: NullPointerException");
202       
203       } catch(NullPointerException e) {
204          //
205          // no message in exception (getMessage() returned null)
206          //
207          verifyException("java.net.URLEncoder", e);
208       }
209   }
210
211   @Test(timeout = 4000)
212   public void test12()  throws Throwable  {
213       RESTClient rESTClient0 = new RESTClient("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/", (-697));
214       // Undeclared exception!
215       try { 
216         rESTClient0.httpPut("");
217         fail("Expecting exception: IllegalArgumentException");
218       
219       } catch(IllegalArgumentException e) {
220          //
221          // Illegal character in path at index 11: szM4DVVoiAs`]T/
222          //
223          verifyException("java.net.URI", e);
224       }
225   }
226
227   @Test(timeout = 4000)
228   public void test13()  throws Throwable  {
229       RESTClient rESTClient0 = new RESTClient((String) null);
230       // Undeclared exception!
231       try { 
232         rESTClient0.httpPost(" I3^~h5yoFuif");
233         fail("Expecting exception: NullPointerException");
234       
235       } catch(NullPointerException e) {
236          //
237          // no message in exception (getMessage() returned null)
238          //
239       }
240   }
241
242   @Test(timeout = 4000)
243   public void test14()  throws Throwable  {
244       RESTConfig rESTConfig0 = new RESTConfig("&", false);
245       RESTClient rESTClient0 = new RESTClient(rESTConfig0);
246       rESTClient0.setHeader((String) null, "/G$0vW$R4vUaL)*tz");
247       // Undeclared exception!
248       try { 
249         rESTClient0.httpPost("/G$0vW$R4vUaL)*tz");
250         fail("Expecting exception: IllegalArgumentException");
251       
252       } catch(IllegalArgumentException e) {
253          //
254          // Header name may not be null
255          //
256          verifyException("org.apache.http.util.Args", e);
257       }
258   }
259
260   @Test(timeout = 4000)
261   public void test15()  throws Throwable  {
262       RESTClient rESTClient0 = new RESTClient("oO!CF58JhSCm6t");
263       rESTClient0.addParameter((String) null, "oO!CF58JhSCm6t");
264       // Undeclared exception!
265       try { 
266         rESTClient0.httpPost();
267         fail("Expecting exception: NullPointerException");
268       
269       } catch(NullPointerException e) {
270          //
271          // no message in exception (getMessage() returned null)
272          //
273          verifyException("java.net.URLEncoder", e);
274       }
275   }
276
277   @Test(timeout = 4000)
278   public void test16()  throws Throwable  {
279       RESTClient rESTClient0 = new RESTClient((String) null, "F(Oy=<SOmNE9", (-1932735280));
280       // Undeclared exception!
281       try { 
282         rESTClient0.httpPost();
283         fail("Expecting exception: NullPointerException");
284       
285       } catch(NullPointerException e) {
286          //
287          // no message in exception (getMessage() returned null)
288          //
289       }
290   }
291
292   @Test(timeout = 4000)
293   public void test17()  throws Throwable  {
294       RESTConfig rESTConfig0 = new RESTConfig("JAl/&Uq6mM8Kf8", false);
295       RESTClient rESTClient0 = new RESTClient(rESTConfig0);
296       // Undeclared exception!
297       try { 
298         rESTClient0.httpPost();
299         fail("Expecting exception: IllegalStateException");
300       
301       } catch(IllegalStateException e) {
302          //
303          // Target host is null
304          //
305          verifyException("org.apache.http.util.Asserts", e);
306       }
307   }
308
309   @Test(timeout = 4000)
310   public void test18()  throws Throwable  {
311       RESTClient rESTClient0 = new RESTClient("\7f&8\7fjW\"", "\7f&8\7fjW\"", (-1));
312       // Undeclared exception!
313       try { 
314         rESTClient0.httpPost();
315         fail("Expecting exception: IllegalArgumentException");
316       
317       } catch(IllegalArgumentException e) {
318          //
319          // Illegal character in path at index 0: \7f&8\7fjW\"
320          //
321          verifyException("java.net.URI", e);
322       }
323   }
324
325   @Test(timeout = 4000)
326   public void test19()  throws Throwable  {
327       RESTClient rESTClient0 = new RESTClient(")7l9={q>0E4sV]T");
328       RESTClient rESTClient1 = rESTClient0.addParameter((String) null, ")7l9={q>0E4sV]T");
329       // Undeclared exception!
330       try { 
331         rESTClient1.httpPatch((String) null);
332         fail("Expecting exception: NullPointerException");
333       
334       } catch(NullPointerException e) {
335          //
336          // no message in exception (getMessage() returned null)
337          //
338          verifyException("java.net.URLEncoder", e);
339       }
340   }
341
342   @Test(timeout = 4000)
343   public void test20()  throws Throwable  {
344       RESTClient rESTClient0 = new RESTClient("[59t(J)");
345       // Undeclared exception!
346       try { 
347         rESTClient0.httpPatch("[59t(J)");
348         fail("Expecting exception: IllegalArgumentException");
349       
350       } catch(IllegalArgumentException e) {
351          //
352          // Illegal character in path at index 0: [59t(J)
353          //
354          verifyException("java.net.URI", e);
355       }
356   }
357
358   @Test(timeout = 4000)
359   public void test21()  throws Throwable  {
360       RESTClient rESTClient0 = new RESTClient("A29%23fZqv%7F*%405=%7F%7Frdbt-X%22DB%2FhCrUn", "=", (-1));
361       HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
362       doReturn((String) null).when(httpClient0).toString();
363       doReturn((HttpResponse) null).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
364       rESTClient0.setUnitTestClient(httpClient0);
365       // Undeclared exception!
366       try { 
367         rESTClient0.httpGet();
368         fail("Expecting exception: NullPointerException");
369       
370       } catch(NullPointerException e) {
371          //
372          // no message in exception (getMessage() returned null)
373          //
374          verifyException("org.openecomp.mso.rest.APIResponse", e);
375       }
376   }
377
378   @Test(timeout = 4000)
379   public void test22()  throws Throwable  {
380       RESTClient rESTClient0 = new RESTClient("\7f*;R");
381       // Undeclared exception!
382       try { 
383         rESTClient0.httpGet();
384         fail("Expecting exception: IllegalArgumentException");
385       
386       } catch(IllegalArgumentException e) {
387          //
388          // Illegal character in path at index 0: \7f*;R
389          //
390          verifyException("java.net.URI", e);
391       }
392   }
393
394   @Test(timeout = 4000)
395   public void test23()  throws Throwable  {
396       RESTClient rESTClient0 = new RESTClient("compatibility");
397       RESTClient rESTClient1 = rESTClient0.addParameter("https", "https");
398       RESTClient rESTClient2 = rESTClient1.setHeader("compatibility", "https");
399       RESTClient rESTClient3 = rESTClient2.setParameter("4#'mD<\"jNh?>_vfI:]", "Char array buffer");
400       InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer());
401       InputStreamEntity inputStreamEntity0 = new InputStreamEntity(inputStream0);
402       StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
403       doReturn(0).when(statusLine0).getStatusCode();
404       rESTClient3.addHeader("2b?N", "https");
405       HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
406       doReturn(inputStreamEntity0, (HttpEntity) null, (HttpEntity) null).when(httpResponse0).getEntity();
407       doReturn(statusLine0).when(httpResponse0).getStatusLine();
408       HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
409       doReturn("GiQ=e\7fHBwH9zA4COa").when(httpClient0).toString();
410       doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
411       rESTClient2.setUnitTestClient(httpClient0);
412       // Undeclared exception!
413       try { 
414         rESTClient3.httpDelete("");
415         fail("Expecting exception: IllegalArgumentException");
416       
417       } catch(IllegalArgumentException e) {
418          //
419          // Entity may not be null
420          //
421          verifyException("org.apache.http.util.Args", e);
422       }
423   }
424
425   @Test(timeout = 4000)
426   public void test24()  throws Throwable  {
427       RESTClient rESTClient0 = new RESTClient(")TZ;T]b%B[FkT4", "%y@{Wz}c3J-!m", 1772);
428       RESTClient rESTClient1 = rESTClient0.addParameter("$y*O^k0", (String) null);
429       // Undeclared exception!
430       try { 
431         rESTClient1.httpDelete((String) null);
432         fail("Expecting exception: NullPointerException");
433       
434       } catch(NullPointerException e) {
435          //
436          // no message in exception (getMessage() returned null)
437          //
438          verifyException("java.net.URLEncoder", e);
439       }
440   }
441
442   @Test(timeout = 4000)
443   public void test25()  throws Throwable  {
444       RESTClient rESTClient0 = new RESTClient("Length Required");
445       // Undeclared exception!
446       try { 
447         rESTClient0.httpDelete("Length Required");
448         fail("Expecting exception: IllegalArgumentException");
449       
450       } catch(IllegalArgumentException e) {
451          //
452          // Illegal character in path at index 6: Length Required
453          //
454          verifyException("java.net.URI", e);
455       }
456   }
457
458   @Test(timeout = 4000)
459   public void test26()  throws Throwable  {
460       RESTConfig rESTConfig0 = new RESTConfig("yhPl=c#;<s`V", false);
461       RESTClient rESTClient0 = new RESTClient(rESTConfig0);
462       rESTClient0.addParameter("yhPl=c#;<s`V", (String) null);
463       // Undeclared exception!
464       try { 
465         rESTClient0.httpDelete();
466         fail("Expecting exception: NullPointerException");
467       
468       } catch(NullPointerException e) {
469          //
470          // no message in exception (getMessage() returned null)
471          //
472          verifyException("java.net.URLEncoder", e);
473       }
474   }
475
476   @Test(timeout = 4000)
477   public void test27()  throws Throwable  {
478       RESTConfig rESTConfig0 = new RESTConfig("2cSq'/FF]W'K.S^k=<=", "2cSq'/FF]W'K.S^k=<=", 2605);
479       RESTClient rESTClient0 = new RESTClient(rESTConfig0);
480       // Undeclared exception!
481       try { 
482         rESTClient0.httpDelete();
483         fail("Expecting exception: IllegalArgumentException");
484       
485       } catch(IllegalArgumentException e) {
486          //
487          // Illegal character in path at index 8: 2cSq'/FF]W'K.S^k=<=
488          //
489          verifyException("java.net.URI", e);
490       }
491   }
492
493   @Test(timeout = 4000)
494   public void test28()  throws Throwable  {
495       RESTClient rESTClient0 = new RESTClient(")7l9={q>0E4sV]T");
496       RESTClient rESTClient1 = rESTClient0.addParameter((String) null, ")7l9={q>0E4sV]T");
497       // Undeclared exception!
498       try { 
499         rESTClient1.get();
500         fail("Expecting exception: NullPointerException");
501       
502       } catch(NullPointerException e) {
503          //
504          // no message in exception (getMessage() returned null)
505          //
506          verifyException("java.net.URLEncoder", e);
507       }
508   }
509
510   @Test(timeout = 4000)
511   public void test29()  throws Throwable  {
512       RESTClient rESTClient0 = new RESTClient("z8UR?=)5pTtS]*");
513       // Undeclared exception!
514       try { 
515         rESTClient0.get();
516         fail("Expecting exception: IllegalStateException");
517       
518       } catch(IllegalStateException e) {
519          //
520          // Target host is null
521          //
522          verifyException("org.apache.http.util.Asserts", e);
523       }
524   }
525
526   @Test(timeout = 4000)
527   public void test30()  throws Throwable  {
528       RESTClient rESTClient0 = new RESTClient("JB<\7fTRwDR@k.-C$=w3", "|N", 0);
529       // Undeclared exception!
530       try { 
531         rESTClient0.get();
532         fail("Expecting exception: IllegalArgumentException");
533       
534       } catch(IllegalArgumentException e) {
535          //
536          // Illegal character in path at index 2: JB<\7fTRwDR@k.-C$=w3
537          //
538          verifyException("java.net.URI", e);
539       }
540   }
541
542   @Test(timeout = 4000)
543   public void test31()  throws Throwable  {
544       RESTClient rESTClient0 = new RESTClient("YoeLljo%3A%5C%3D=http", "http.protocol.element-charset", (-1908874351));
545       RESTClient rESTClient1 = rESTClient0.setParameter("I/O exception (", (String) null);
546       // Undeclared exception!
547       try { 
548         rESTClient1.delete();
549         fail("Expecting exception: NullPointerException");
550       
551       } catch(NullPointerException e) {
552          //
553          // no message in exception (getMessage() returned null)
554          //
555          verifyException("java.net.URLEncoder", e);
556       }
557   }
558
559   @Test(timeout = 4000)
560   public void test32()  throws Throwable  {
561       RESTClient rESTClient0 = new RESTClient("\":VYxeR;PP]jO_[f'");
562       // Undeclared exception!
563       try { 
564         rESTClient0.delete();
565         fail("Expecting exception: IllegalArgumentException");
566       
567       } catch(IllegalArgumentException e) {
568          //
569          // Illegal character in scheme name at index 0: \":VYxeR;PP]jO_[f'
570          //
571          verifyException("java.net.URI", e);
572       }
573   }
574
575   @Test(timeout = 4000)
576   public void test33()  throws Throwable  {
577       RESTClient rESTClient0 = null;
578       try {
579         rESTClient0 = new RESTClient((RESTConfig) null);
580         fail("Expecting exception: NullPointerException");
581       
582       } catch(NullPointerException e) {
583          //
584          // no message in exception (getMessage() returned null)
585          //
586          verifyException("org.openecomp.mso.rest.RESTClient", e);
587       }
588   }
589
590   @Test(timeout = 4000)
591   public void test34()  throws Throwable  {
592       RESTClient rESTClient0 = new RESTClient("");
593       rESTClient0.addParameter("", "");
594       // Undeclared exception!
595       try { 
596         rESTClient0.httpPatch("lr");
597         fail("Expecting exception: IllegalStateException");
598       
599       } catch(IllegalStateException e) {
600          //
601          // Target host is null
602          //
603          verifyException("org.apache.http.util.Asserts", e);
604       }
605   }
606
607   @Test(timeout = 4000)
608   public void test35()  throws Throwable  {
609       RESTClient rESTClient0 = new RESTClient("", "netscape", 1);
610       // Undeclared exception!
611       try { 
612         rESTClient0.httpPost("");
613         fail("Expecting exception: IllegalStateException");
614       
615       } catch(IllegalStateException e) {
616          //
617          // Target host is null
618          //
619          verifyException("org.apache.http.util.Asserts", e);
620       }
621   }
622
623   @Test(timeout = 4000)
624   public void test36()  throws Throwable  {
625       RESTConfig rESTConfig0 = new RESTConfig((String) null);
626       RESTClient rESTClient0 = new RESTClient(rESTConfig0);
627       // Undeclared exception!
628       try { 
629         rESTClient0.httpGet();
630         fail("Expecting exception: IllegalStateException");
631       
632       } catch(IllegalStateException e) {
633          //
634          // Target host is null
635          //
636          verifyException("org.apache.http.util.Asserts", e);
637       }
638   }
639
640   @Test(timeout = 4000)
641   public void test37()  throws Throwable  {
642       RESTClient rESTClient0 = new RESTClient("K.7:dc=", "K.7:dc=", 0);
643       try { 
644         rESTClient0.httpPost();
645         fail("Expecting exception: Exception");
646       
647       } catch(Exception e) {
648          //
649          // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: K.7:dc=
650          //
651          verifyException("org.openecomp.mso.rest.RESTClient", e);
652       }
653   }
654
655   @Test(timeout = 4000)
656   public void test38()  throws Throwable  {
657       RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException=", "EWh2BZ[]:q+%4S#7K", (-1847));
658       // Undeclared exception!
659       try { 
660         rESTClient0.httpDelete();
661         fail("Expecting exception: IllegalStateException");
662       
663       } catch(IllegalStateException e) {
664          //
665          // Target host is null
666          //
667          verifyException("org.apache.http.util.Asserts", e);
668       }
669   }
670
671   @Test(timeout = 4000)
672   public void test39()  throws Throwable  {
673       RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt");
674       String string0 = rESTClient0.getURL();
675       assertEquals(",%LX:SC+'3!nt", string0);
676   }
677
678   @Test(timeout = 4000)
679   public void test40()  throws Throwable  {
680       RESTClient rESTClient0 = new RESTClient("compatibility");
681       InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer());
682       doReturn((-3113)).when(inputStream0).read(any(byte[].class));
683       HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
684       StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
685       doReturn(201).when(statusLine0).getStatusCode();
686       HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
687       doReturn(inputStream0).when(httpEntity1).getContent();
688       doReturn(0L, (long)(-2116360694)).when(httpEntity1).getContentLength();
689       HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
690       doReturn(false).when(httpEntity2).isStreaming();
691       HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
692       doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity();
693       doReturn(statusLine0).when(httpResponse0).getStatusLine();
694       HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
695       doReturn("GiQ=e\7fHBwH9zA4COa").when(httpClient0).toString();
696       doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
697       rESTClient0.setUnitTestClient(httpClient0);
698       // Undeclared exception!
699       try { 
700         rESTClient0.httpDelete("");
701         fail("Expecting exception: IndexOutOfBoundsException");
702       
703       } catch(IndexOutOfBoundsException e) {
704          //
705          // off: 0 len: -3113 b.length: 4096
706          //
707          verifyException("org.apache.http.util.ByteArrayBuffer", e);
708       }
709   }
710
711   @Test(timeout = 4000)
712   public void test41()  throws Throwable  {
713       RESTClient rESTClient0 = new RESTClient("compatibility");
714       HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
715       StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
716       doReturn(201).when(statusLine0).getStatusCode();
717       Header[] headerArray0 = new Header[0];
718       HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
719       doReturn((InputStream) null).when(httpEntity1).getContent();
720       HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
721       doReturn(false).when(httpEntity2).isStreaming();
722       HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
723       doReturn(headerArray0).when(httpResponse0).getAllHeaders();
724       doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity();
725       doReturn(statusLine0).when(httpResponse0).getStatusLine();
726       HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
727       doReturn("GiQ=e\7fHBwH9zA4COa").when(httpClient0).toString();
728       doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
729       rESTClient0.setUnitTestClient(httpClient0);
730       APIResponse aPIResponse0 = rESTClient0.httpDelete("");
731       assertEquals(201, aPIResponse0.getStatusCode());
732   }
733
734   @Test(timeout = 4000)
735   public void test42()  throws Throwable  {
736       RESTClient rESTClient0 = new RESTClient("wlq:6r");
737       try { 
738         rESTClient0.httpDelete("E");
739         fail("Expecting exception: Exception");
740       
741       } catch(Exception e) {
742          //
743          // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: wlq:6r
744          //
745          verifyException("org.openecomp.mso.rest.RESTClient", e);
746       }
747   }
748
749   @Test(timeout = 4000)
750   public void test43()  throws Throwable  {
751       RESTClient rESTClient0 = new RESTClient("");
752       // Undeclared exception!
753       try { 
754         rESTClient0.httpPatch("");
755         fail("Expecting exception: IllegalStateException");
756       
757       } catch(IllegalStateException e) {
758          //
759          // Target host is null
760          //
761          verifyException("org.apache.http.util.Asserts", e);
762       }
763   }
764
765   @Test(timeout = 4000)
766   public void test44()  throws Throwable  {
767       RESTClient rESTClient0 = new RESTClient("DELETE");
768       // Undeclared exception!
769       try { 
770         rESTClient0.httpPatch((String) null);
771         fail("Expecting exception: IllegalStateException");
772       
773       } catch(IllegalStateException e) {
774          //
775          // Target host is null
776          //
777          verifyException("org.apache.http.util.Asserts", e);
778       }
779   }
780
781   @Test(timeout = 4000)
782   public void test45()  throws Throwable  {
783       RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException");
784       RESTClient rESTClient1 = rESTClient0.addParameter("DELETE", "");
785       // Undeclared exception!
786       try { 
787         rESTClient1.patch("<;xR");
788         fail("Expecting exception: IllegalStateException");
789       
790       } catch(IllegalStateException e) {
791          //
792          // Target host is null
793          //
794          verifyException("org.apache.http.util.Asserts", e);
795       }
796   }
797
798   @Test(timeout = 4000)
799   public void test46()  throws Throwable  {
800       RESTClient rESTClient0 = new RESTClient("compatibility");
801       HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
802       StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
803       doReturn(201).when(statusLine0).getStatusCode();
804       Header[] headerArray0 = new Header[0];
805       HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
806       doReturn((InputStream) null).when(httpEntity1).getContent();
807       HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
808       doReturn(false).when(httpEntity2).isStreaming();
809       HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
810       doReturn(headerArray0).when(httpResponse0).getAllHeaders();
811       doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity();
812       doReturn(statusLine0).when(httpResponse0).getStatusLine();
813       HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
814       doReturn("GiQ=e\7fHBwH9zA4COa").when(httpClient0).toString();
815       doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
816       rESTClient0.setUnitTestClient(httpClient0);
817       APIResponse aPIResponse0 = rESTClient0.httpPut("compatibility");
818       assertEquals(201, aPIResponse0.getStatusCode());
819   }
820
821   @Test(timeout = 4000)
822   public void test47()  throws Throwable  {
823       RESTClient rESTClient0 = new RESTClient("");
824       // Undeclared exception!
825       try { 
826         rESTClient0.httpPut("");
827         fail("Expecting exception: IllegalStateException");
828       
829       } catch(IllegalStateException e) {
830          //
831          // Target host is null
832          //
833          verifyException("org.apache.http.util.Asserts", e);
834       }
835   }
836
837   @Test(timeout = 4000)
838   public void test48()  throws Throwable  {
839       RESTClient rESTClient0 = new RESTClient("compatibility");
840       rESTClient0.addParameter("https", "https");
841       // Undeclared exception!
842       try { 
843         rESTClient0.httpPut("compatibility");
844         fail("Expecting exception: IllegalStateException");
845       
846       } catch(IllegalStateException e) {
847          //
848          // Target host is null
849          //
850          verifyException("org.apache.http.util.Asserts", e);
851       }
852   }
853
854   @Test(timeout = 4000)
855   public void test49()  throws Throwable  {
856       RESTClient rESTClient0 = new RESTClient("", "(", 307);
857       // Undeclared exception!
858       try { 
859         rESTClient0.httpPut((String) null);
860         fail("Expecting exception: IllegalStateException");
861       
862       } catch(IllegalStateException e) {
863          //
864          // Target host is null
865          //
866          verifyException("org.apache.http.util.Asserts", e);
867       }
868   }
869
870   @Test(timeout = 4000)
871   public void test50()  throws Throwable  {
872       RESTClient rESTClient0 = new RESTClient("@0*Eu-=Fa");
873       // Undeclared exception!
874       try { 
875         rESTClient0.httpPost("@0*Eu-=Fa");
876         fail("Expecting exception: IllegalStateException");
877       
878       } catch(IllegalStateException e) {
879          //
880          // Target host is null
881          //
882          verifyException("org.apache.http.util.Asserts", e);
883       }
884   }
885
886   @Test(timeout = 4000)
887   public void test51()  throws Throwable  {
888       RESTClient rESTClient0 = new RESTClient("x");
889       // Undeclared exception!
890       try { 
891         rESTClient0.httpPost((String) null);
892         fail("Expecting exception: IllegalStateException");
893       
894       } catch(IllegalStateException e) {
895          //
896          // Target host is null
897          //
898          verifyException("org.apache.http.util.Asserts", e);
899       }
900   }
901
902   @Test(timeout = 4000)
903   public void test52()  throws Throwable  {
904       RESTConfig rESTConfig0 = new RESTConfig("2cSq'/FF]W'K.S^k=<=", "2cSq'/FF]W'K.S^k=<=", 2605);
905       RESTClient rESTClient0 = new RESTClient(rESTConfig0);
906       RESTClient rESTClient1 = rESTClient0.setHeader("WkI\7f<", "http");
907       RESTClient rESTClient2 = rESTClient1.setHeader("WkI\7f<", "");
908       assertEquals("2cSq'/FF]W'K.S^k=<=", rESTClient2.getURL());
909   }
910
911   @Test(timeout = 4000)
912   public void test53()  throws Throwable  {
913       RESTClient rESTClient0 = new RESTClient("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/", (-697));
914       RESTClient rESTClient1 = rESTClient0.setHeader("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/");
915       RESTClient rESTClient2 = rESTClient1.addHeader("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/");
916       assertSame(rESTClient0, rESTClient2);
917   }
918
919   @Test(timeout = 4000)
920   public void test54()  throws Throwable  {
921       RESTClient rESTClient0 = new RESTClient("E U(~h|zVLWi", "http", 0);
922       rESTClient0.setParameter("E U(~h|zVLWi", "http");
923       RESTClient rESTClient1 = rESTClient0.setParameter("E U(~h|zVLWi", "k@(}4U05'$}yl)W");
924       assertSame(rESTClient1, rESTClient0);
925   }
926
927   @Test(timeout = 4000)
928   public void test55()  throws Throwable  {
929       RESTClient rESTClient0 = new RESTClient("");
930       RESTClient rESTClient1 = rESTClient0.addParameter("", "");
931       RESTClient rESTClient2 = rESTClient0.addParameter("", (String) null);
932       assertSame(rESTClient2, rESTClient1);
933   }
934
935   @Test(timeout = 4000)
936   public void test56()  throws Throwable  {
937       RESTClient rESTClient0 = new RESTClient("compatibility");
938       rESTClient0.addParameter("https", "https");
939       RESTClient rESTClient1 = rESTClient0.setParameter("4#'mD<\"jNh?>_vfI:]", "Char array buffer");
940       // Undeclared exception!
941       try { 
942         rESTClient1.httpDelete("");
943         fail("Expecting exception: IllegalStateException");
944       
945       } catch(IllegalStateException e) {
946          //
947          // Target host is null
948          //
949          verifyException("org.apache.http.util.Asserts", e);
950       }
951   }
952
953   @Test(timeout = 4000)
954   public void test57()  throws Throwable  {
955       RESTClient rESTClient0 = new RESTClient("K.7:dc=");
956       try { 
957         rESTClient0.get();
958         fail("Expecting exception: Exception");
959       
960       } catch(Exception e) {
961          //
962          // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: K.7:dc=
963          //
964          verifyException("org.openecomp.mso.rest.RESTClient", e);
965       }
966   }
967
968   @Test(timeout = 4000)
969   public void test58()  throws Throwable  {
970       RESTClient rESTClient0 = new RESTClient("http.virtual-host");
971       RESTClient rESTClient1 = rESTClient0.addAuthorizationHeader("EWh2BZ[]:q+%4S#7K");
972       assertSame(rESTClient0, rESTClient1);
973   }
974
975   @Test(timeout = 4000)
976   public void test59()  throws Throwable  {
977       RESTClient rESTClient0 = new RESTClient("YoeLljo%3A%5C%3D=http", "http.protocol.element-charset", (-1908874351));
978       // Undeclared exception!
979       try { 
980         rESTClient0.delete();
981         fail("Expecting exception: IllegalStateException");
982       
983       } catch(IllegalStateException e) {
984          //
985          // Target host is null
986          //
987          verifyException("org.apache.http.util.Asserts", e);
988       }
989   }
990
991   @Test(timeout = 4000)
992   public void test60()  throws Throwable  {
993       RESTConfig rESTConfig0 = new RESTConfig("UTF-8");
994       RESTClient rESTClient0 = new RESTClient(rESTConfig0);
995       HttpEntity httpEntity0 = rESTClient0.getHttpEntity();
996       assertNull(httpEntity0);
997   }
998
999   @Test(timeout = 4000)
1000   public void test61()  throws Throwable  {
1001       RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt");
1002       LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient0.getHeaders();
1003       assertEquals(0, linkedHashMap0.size());
1004   }
1005
1006   @Test(timeout = 4000)
1007   public void test62()  throws Throwable  {
1008       RESTClient rESTClient0 = new RESTClient("DELETE");
1009       HttpClient httpClient0 = rESTClient0.getUnitTestClient();
1010       assertNull(httpClient0);
1011   }
1012
1013   @Test(timeout = 4000)
1014   public void test63()  throws Throwable  {
1015       RESTClient rESTClient0 = new RESTClient("A29%23fZqv%7F*%405=%7F%7Frdbt-X%22DB%2FhCrUn", "=", (-1));
1016       RESTClient rESTClient1 = rESTClient0.addParameter("o", "o");
1017       // Undeclared exception!
1018       try { 
1019         rESTClient1.httpGet();
1020         fail("Expecting exception: IllegalStateException");
1021       
1022       } catch(IllegalStateException e) {
1023          //
1024          // Target host is null
1025          //
1026          verifyException("org.apache.http.util.Asserts", e);
1027       }
1028   }
1029
1030   @Test(timeout = 4000)
1031   public void test64()  throws Throwable  {
1032       RESTClient rESTClient0 = new RESTClient("DELETE");
1033       LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient0.getParameters();
1034       assertTrue(linkedHashMap0.isEmpty());
1035   }
1036
1037   @Test(timeout = 4000)
1038   public void test65()  throws Throwable  {
1039       RESTClient rESTClient0 = new RESTClient("");
1040       // Undeclared exception!
1041       try { 
1042         rESTClient0.post();
1043         fail("Expecting exception: IllegalStateException");
1044       
1045       } catch(IllegalStateException e) {
1046          //
1047          // Target host is null
1048          //
1049          verifyException("org.apache.http.util.Asserts", e);
1050       }
1051   }
1052
1053   @Test(timeout = 4000)
1054   public void test66()  throws Throwable  {
1055       RESTClient rESTClient0 = new RESTClient("DELETE");
1056       // Undeclared exception!
1057       try { 
1058         rESTClient0.httpDelete((String) null);
1059         fail("Expecting exception: IllegalStateException");
1060       
1061       } catch(IllegalStateException e) {
1062          //
1063          // Target host is null
1064          //
1065          verifyException("org.apache.http.util.Asserts", e);
1066       }
1067   }
1068 }