2 * This file was automatically generated by EvoSuite
3 * Mon Nov 14 11:47:59 GMT 2016
7 * ============LICENSE_START=======================================================
9 * ================================================================================
10 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
11 * ================================================================================
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
16 * http://www.apache.org/licenses/LICENSE-2.0
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 * ============LICENSE_END=========================================================
26 package org.openecomp.mso.rest;
28 import org.junit.Test;
29 import static org.junit.Assert.*;
30 import static org.evosuite.runtime.EvoAssertions.*;
32 import org.evosuite.runtime.EvoRunner;
33 import org.evosuite.runtime.EvoRunnerParameters;
34 import org.evosuite.runtime.mock.java.lang.MockThrowable;
35 import org.junit.runner.RunWith;
37 @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
38 public class RESTExceptionESTest extends RESTExceptionESTestscaffolding {
41 public void test0() throws Throwable {
42 RESTException rESTException0 = new RESTException(0, (String) null);
43 int int0 = rESTException0.getStatusCode();
44 assertEquals(0, int0);
48 public void test1() throws Throwable {
49 RESTException rESTException0 = new RESTException(1619, "");
50 int int0 = rESTException0.getStatusCode();
51 assertEquals(1619, int0);
55 public void test2() throws Throwable {
56 RESTException rESTException0 = new RESTException("");
57 String string0 = rESTException0.getErrorMessage();
58 assertEquals("", string0);
62 public void test3() throws Throwable {
63 RESTException rESTException0 = null;
65 rESTException0 = new RESTException((Throwable) null);
66 fail("Expecting exception: NullPointerException");
68 } catch(NullPointerException e) {
70 // no message in exception (getMessage() returned null)
72 verifyException("org.openecomp.mso.rest.RESTException", e);
77 public void test4() throws Throwable {
78 RESTException rESTException0 = new RESTException((-489), "org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable");
79 String string0 = rESTException0.getErrorMessage();
80 assertEquals("org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable", string0);
84 public void test5() throws Throwable {
85 MockThrowable mockThrowable0 = new MockThrowable();
86 RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
87 int int0 = rESTException0.getStatusCode();
88 assertEquals((-1), int0);
92 public void test6() throws Throwable {
93 MockThrowable mockThrowable0 = new MockThrowable();
94 RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
95 String string0 = rESTException0.getErrorMessage();