Merge "Increasing test coverage for vid.mso.rest"
[vid.git] / vid-app-common / src / test / java / org / onap / vid / mso / RestObjectTest.java
index 8030833..9f8614b 100644 (file)
@@ -7,9 +7,9 @@
  * 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.
@@ -21,7 +21,7 @@
 package org.onap.vid.mso;
 
 import org.hamcrest.MatcherAssert;
-import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
@@ -29,11 +29,11 @@ import static org.assertj.core.api.Assertions.assertThat;
 
 public class RestObjectTest {
 
-    private RestObject restObject;
+    private RestObject<Object> restObject;
 
-    @BeforeSuite
+    @BeforeClass
     private void setUp() {
-        restObject = new RestObject();
+        restObject = new RestObject<>();
     }
 
     @Test
@@ -42,7 +42,7 @@ public class RestObjectTest {
     }
 
     @Test
-    public void shouldHaveValidGetterAndSetterForBody() {
+    public void shouldHaveValidGetterAndSetterForTObject() {
         //  given
         String testString = "set/get_testString";
 
@@ -54,13 +54,13 @@ public class RestObjectTest {
     }
 
     @Test
-    public void shouldProperlyCopyRestObject() {
+    public void shouldProperlyCopyFromOneRestObjectToAnotherWithProperParameters() {
         //  given
         MsoResponseWrapper testResponseWraper = new MsoResponseWrapper();
         String rawTestString = "rawTestString";
         int statusCode = 404;
 
-        RestObject restObjectToCopyFrom = new RestObject<>();
+        RestObject<Object> restObjectToCopyFrom = new RestObject<>();
         restObjectToCopyFrom.set(testResponseWraper);
         restObjectToCopyFrom.setRaw(rawTestString);
         restObjectToCopyFrom.setStatusCode(statusCode);
@@ -91,4 +91,4 @@ public class RestObjectTest {
         //  then
         assertThat(toStringResponse).isEqualTo(properString);
     }
-}
+}
\ No newline at end of file