2 * This file was automatically generated by EvoSuite
3 * Mon Nov 14 08:19:44 GMT 2016
6 package org.openecomp.mso.db.catalog.beans;
9 import static org.junit.Assert.*;
10 import static org.evosuite.shaded.org.mockito.Mockito.*;
11 import static org.evosuite.runtime.EvoAssertions.*;
13 import java.sql.Timestamp;
14 import java.time.Clock;
15 import java.time.LocalDateTime;
16 import java.util.HashMap;
19 import org.evosuite.runtime.EvoRunner;
20 import org.evosuite.runtime.EvoRunnerParameters;
21 import org.evosuite.runtime.ViolatedAssumptionAnswer;
22 import org.evosuite.runtime.mock.java.time.MockClock;
23 import org.evosuite.runtime.mock.java.time.MockLocalDateTime;
24 import org.junit.runner.RunWith;
26 @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
27 public class ServiceESTest extends ServiceESTestscaffolding {
30 public void test00() throws Throwable {
31 Service service0 = new Service();
32 service0.setServiceVersion("RECIPE: ");
33 String string0 = service0.getServiceVersion();
34 assertEquals("RECIPE: ", string0);
38 public void test01() throws Throwable {
39 Service service0 = new Service();
40 service0.setServiceNameVersionId(">{PeD}EDcITG;{Z%FH");
41 String string0 = service0.getServiceNameVersionId();
42 assertEquals(">{PeD}EDcITG;{Z%FH", string0);
46 public void test02() throws Throwable {
47 Service service0 = new Service();
48 service0.setServiceName("RECIPE: ");
49 String string0 = service0.getServiceName();
50 assertEquals("RECIPE: ", string0);
54 public void test03() throws Throwable {
55 Service service0 = new Service();
56 service0.setServiceName("");
57 String string0 = service0.getServiceName();
58 assertEquals("", string0);
62 public void test04() throws Throwable {
63 Service service0 = new Service();
64 HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>();
65 ServiceRecipe serviceRecipe0 = new ServiceRecipe();
66 hashMap0.put(",created=", serviceRecipe0);
67 service0.setRecipes(hashMap0);
68 Map<String, ServiceRecipe> map0 = service0.getRecipes();
69 assertFalse(map0.isEmpty());
73 public void test05() throws Throwable {
74 Service service0 = new Service();
75 service0.setModelInvariantUUID("BZ@s");
76 String string0 = service0.getModelInvariantUUID();
77 assertEquals("BZ@s", string0);
81 public void test06() throws Throwable {
82 Service service0 = new Service();
84 int int0 = service0.getId();
85 assertEquals(1033, int0);
89 public void test07() throws Throwable {
90 Service service0 = new Service();
91 service0.setId((-164));
92 int int0 = service0.getId();
93 assertEquals((-164), int0);
97 public void test08() throws Throwable {
98 Service service0 = new Service();
99 service0.setHttpMethod(",description=");
100 String string0 = service0.getHttpMethod();
101 assertEquals(",description=", string0);
104 @Test(timeout = 4000)
105 public void test09() throws Throwable {
106 Service service0 = new Service();
107 service0.setDescription("");
108 String string0 = service0.getDescription();
109 assertEquals("", string0);
112 @Test(timeout = 4000)
113 public void test10() throws Throwable {
114 Service service0 = new Service();
115 Timestamp timestamp0 = new Timestamp(0L);
116 service0.setCreated(timestamp0);
117 Timestamp timestamp1 = service0.getCreated();
118 assertEquals(0, timestamp1.getNanos());
121 @Test(timeout = 4000)
122 public void test11() throws Throwable {
123 Service service0 = new Service();
124 Clock clock0 = MockClock.systemUTC();
125 LocalDateTime localDateTime0 = MockLocalDateTime.now(clock0);
126 Timestamp timestamp0 = Timestamp.valueOf(localDateTime0);
127 service0.setCreated(timestamp0);
128 Timestamp timestamp1 = service0.getCreated();
129 assertSame(timestamp1, timestamp0);
132 @Test(timeout = 4000)
133 public void test12() throws Throwable {
134 Service service0 = new Service();
135 // Undeclared exception!
138 fail("Expecting exception: NullPointerException");
140 } catch(NullPointerException e) {
142 // no message in exception (getMessage() returned null)
144 verifyException("org.openecomp.mso.db.catalog.beans.Service", e);
148 @Test(timeout = 4000)
149 public void test13() throws Throwable {
150 Service service0 = new Service();
151 HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>();
152 ServiceRecipe serviceRecipe0 = new ServiceRecipe();
153 hashMap0.put(",created=", serviceRecipe0);
154 service0.setRecipes(hashMap0);
155 String string0 = service0.toString();
156 assertEquals("SERVICE: id=0,name=null,version=null,description=null,modelInvariantUUID=null\nRECIPE: null,uri=null", string0);
159 @Test(timeout = 4000)
160 public void test14() throws Throwable {
161 Service service0 = new Service();
162 service0.setServiceNameVersionId("83y*#72]},kHXOT");
163 service0.setServiceNameVersionId("f6t}qujI)DMM>b=J");
164 Map<String, ServiceRecipe> map0 = (Map<String, ServiceRecipe>) mock(Map.class, new ViolatedAssumptionAnswer());
165 doReturn((String) null).when(map0).toString();
166 doReturn((Set) null).when(map0).keySet();
167 service0.setRecipes(map0);
168 service0.isTheSameVersion("83y*#72]},kHXOT");
169 service0.isMoreRecentThan(")0");
170 service0.getRecipes();
171 // Undeclared exception!
174 fail("Expecting exception: NullPointerException");
176 } catch(NullPointerException e) {
178 // no message in exception (getMessage() returned null)
180 verifyException("org.openecomp.mso.db.catalog.beans.Service", e);
184 @Test(timeout = 4000)
185 public void test15() throws Throwable {
186 Service service0 = new Service();
187 String string0 = service0.getDescription();
191 @Test(timeout = 4000)
192 public void test16() throws Throwable {
193 Service service0 = new Service();
194 HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>();
195 service0.setRecipes(hashMap0);
196 Map<String, ServiceRecipe> map0 = service0.getRecipes();
197 assertEquals(0, map0.size());
200 @Test(timeout = 4000)
201 public void test17() throws Throwable {
202 Service service0 = new Service();
203 int int0 = service0.getId();
204 assertEquals(0, int0);
207 @Test(timeout = 4000)
208 public void test18() throws Throwable {
209 Service service0 = new Service();
210 String string0 = service0.getServiceName();
214 @Test(timeout = 4000)
215 public void test19() throws Throwable {
216 Service service0 = new Service();
217 service0.setHttpMethod("");
218 String string0 = service0.getHttpMethod();
219 assertEquals("", string0);
222 @Test(timeout = 4000)
223 public void test20() throws Throwable {
224 Service service0 = new Service();
225 String string0 = service0.getModelInvariantUUID();
229 @Test(timeout = 4000)
230 public void test21() throws Throwable {
231 Service service0 = new Service();
232 String string0 = service0.getServiceVersion();
236 @Test(timeout = 4000)
237 public void test22() throws Throwable {
238 Service service0 = new Service();
239 service0.setServiceNameVersionId("");
240 String string0 = service0.getServiceNameVersionId();
241 assertEquals("", string0);
244 @Test(timeout = 4000)
245 public void test23() throws Throwable {
246 Service service0 = new Service();
247 String string0 = service0.getHttpMethod();
251 @Test(timeout = 4000)
252 public void test24() throws Throwable {
253 Service service0 = new Service();
254 Map<String, ServiceRecipe> map0 = service0.getRecipes();
258 @Test(timeout = 4000)
259 public void test25() throws Throwable {
260 Service service0 = new Service();
261 service0.setDescription("Ir%#'ua8B=h&yW\"(|");
262 String string0 = service0.getDescription();
263 assertEquals("Ir%#'ua8B=h&yW\"(|", string0);
266 @Test(timeout = 4000)
267 public void test26() throws Throwable {
268 Service service0 = new Service();
269 String string0 = service0.getServiceNameVersionId();
273 @Test(timeout = 4000)
274 public void test27() throws Throwable {
275 Service service0 = new Service();
276 service0.setServiceVersion("");
277 String string0 = service0.getServiceVersion();
278 assertEquals("", string0);
281 @Test(timeout = 4000)
282 public void test28() throws Throwable {
283 Service service0 = new Service();
284 Timestamp timestamp0 = service0.getCreated();
285 service0.setCreated(timestamp0);
286 assertNull(service0.getServiceName());
289 @Test(timeout = 4000)
290 public void test29() throws Throwable {
291 Service service0 = new Service();
292 service0.setModelInvariantUUID("");
293 String string0 = service0.getModelInvariantUUID();
294 assertEquals("", string0);