Initial OpenECOMP MSO commit
[so.git] / bpmn / MSORESTClient / src / test / java / org / openecomp / mso / rest / RESTExceptionESTest.java
1 /*
2  * This file was automatically generated by EvoSuite
3  * Mon Nov 14 11:47:59 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.runtime.EvoAssertions.*;
11
12 import org.evosuite.runtime.EvoRunner;
13 import org.evosuite.runtime.EvoRunnerParameters;
14 import org.evosuite.runtime.mock.java.lang.MockThrowable;
15 import org.junit.runner.RunWith;
16
17 @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
18 public class RESTExceptionESTest extends RESTExceptionESTestscaffolding {
19
20   @Test(timeout = 4000)
21   public void test0()  throws Throwable  {
22       RESTException rESTException0 = new RESTException(0, (String) null);
23       int int0 = rESTException0.getStatusCode();
24       assertEquals(0, int0);
25   }
26
27   @Test(timeout = 4000)
28   public void test1()  throws Throwable  {
29       RESTException rESTException0 = new RESTException(1619, "");
30       int int0 = rESTException0.getStatusCode();
31       assertEquals(1619, int0);
32   }
33
34   @Test(timeout = 4000)
35   public void test2()  throws Throwable  {
36       RESTException rESTException0 = new RESTException("");
37       String string0 = rESTException0.getErrorMessage();
38       assertEquals("", string0);
39   }
40
41   @Test(timeout = 4000)
42   public void test3()  throws Throwable  {
43       RESTException rESTException0 = null;
44       try {
45         rESTException0 = new RESTException((Throwable) null);
46         fail("Expecting exception: NullPointerException");
47       
48       } catch(NullPointerException e) {
49          //
50          // no message in exception (getMessage() returned null)
51          //
52          verifyException("org.openecomp.mso.rest.RESTException", e);
53       }
54   }
55
56   @Test(timeout = 4000)
57   public void test4()  throws Throwable  {
58       RESTException rESTException0 = new RESTException((-489), "org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable");
59       String string0 = rESTException0.getErrorMessage();
60       assertEquals("org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable", string0);
61   }
62
63   @Test(timeout = 4000)
64   public void test5()  throws Throwable  {
65       MockThrowable mockThrowable0 = new MockThrowable();
66       RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
67       int int0 = rESTException0.getStatusCode();
68       assertEquals((-1), int0);
69   }
70
71   @Test(timeout = 4000)
72   public void test6()  throws Throwable  {
73       MockThrowable mockThrowable0 = new MockThrowable();
74       RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
75       String string0 = rESTException0.getErrorMessage();
76       assertNull(string0);
77   }
78 }