Merge from ECOMP's repository
[vid.git] / vid-app-common / src / test / java / org / onap / vid / scheduler / SchedulerRestInterfaceTest.java
index 0655aca..3e1c89c 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.vid.exceptions.GenericUncheckedException;
+import org.onap.vid.mso.RestObject;
 import org.onap.vid.testUtils.StubServerUtil;
 import org.testng.annotations.AfterMethod;
 
@@ -82,19 +82,19 @@ public class SchedulerRestInterfaceTest {
         RestObject<String> sampleRestObj = new RestObject<>();
         serverUtil.prepareGetCall("/test", RESPONSE_CONTENT, Action.ok());
 
-        schedulerInterface.Get("", SAMPLE_SOURCE_ID, "", sampleRestObj);
+        schedulerInterface.Get("", "", sampleRestObj);
 
         assertResponseHasExpectedBodyAndStatus(sampleRestObj, RESPONSE_CONTENT, 200);
     }
 
-    @Test(expected = GenericUncheckedException.class)
+    @Test(expected = org.onap.vid.aai.ExceptionWithRequestInfo.class)
     public void shouldRaiseExceptionWhenErrorOccursDuringGet() throws JsonProcessingException {
         prepareEnvForTest();
         RestObject<String> sampleRestObj = new RestObject<>();
 
         serverUtil.prepareGetCall("/test", ERROR_RESPONSE, Action.status(HttpStatus.INTERNAL_SERVER_ERROR_500));
 
-        schedulerInterface.Get("", SAMPLE_SOURCE_ID, "", sampleRestObj);
+        schedulerInterface.Get("", "", sampleRestObj);
     }
 
     @Test
@@ -125,7 +125,6 @@ public class SchedulerRestInterfaceTest {
 
         assertThat(sampleRestObj.getStatusCode()).isEqualTo(expectedStatusCode);
         assertThat(parsedResult).isInstanceOf(String.class).isEqualTo(expectedResponse);
-        assertThat(sampleRestObj.getUUID()).isNull();
 
     }