Performance Improvements for Gizmo bulk API
[aai/gizmo.git] / src / test / java / org / onap / crud / service / ChampDaoExceptionsTest.java
index 1f0a20b..31a0ede 100644 (file)
@@ -43,8 +43,12 @@ import org.onap.crud.entity.Edge;
 import org.onap.crud.entity.Vertex;
 import org.onap.crud.exception.CrudException;
 import org.slf4j.MDC;
+import org.junit.runner.RunWith;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.crud.OXMModelLoaderSetup;
 
-public class ChampDaoExceptionsTest {
+@RunWith(MockitoJUnitRunner.Silent.class)
+public class ChampDaoExceptionsTest extends OXMModelLoaderSetup {
     // @formatter:off
                private final String champVertex = "{" +
                    "\"key\": \"test-uuid\"," +
@@ -229,7 +233,7 @@ public class ChampDaoExceptionsTest {
         buildChampDao();
 
         try {
-            champDao.getEdge(idNotExists, type, txId);
+            champDao.getEdge(idNotExists, txId);
         } catch (CrudException e) {
             assertEquals(404, e.getHttpStatus().getStatusCode());
             assertThat(e.getMessage(), containsString(failureCauseForGetEdge));
@@ -250,7 +254,7 @@ public class ChampDaoExceptionsTest {
 
         // Type not matches
         try {
-            champDao.getEdge(id, "", txId);
+            champDao.getEdge(id, txId);
         } catch (CrudException e) {
             assertEquals(404, e.getHttpStatus().getStatusCode());
             assertThat(e.getMessage(), containsString(failureCauseForGetEdgeTypeNotMatches));
@@ -332,7 +336,7 @@ public class ChampDaoExceptionsTest {
         buildChampDao();
 
         try {
-            champDao.getVertexEdges(idNotExists, queryParams);
+            champDao.getVertexEdges(idNotExists, queryParams, null);
         } catch (CrudException e) {
             assertEquals(404, e.getHttpStatus().getStatusCode());
             assertThat(e.getMessage(), containsString(failureCauseForGetVertexEdges));
@@ -509,13 +513,13 @@ public class ChampDaoExceptionsTest {
         buildChampDao();
 
         try {
-            champDao.deleteEdge(id, type);
+            champDao.deleteEdge(id);
         } catch (CrudException e) {
             assertEquals(400, e.getHttpStatus().getStatusCode());
             assertThat(e.getMessage(), containsString(failureCauseFordeleteEdge));
         }
         try {
-            champDao.deleteEdge(id, type, txId);
+            champDao.deleteEdge(id, txId);
         } catch (CrudException e) {
             assertEquals(400, e.getHttpStatus().getStatusCode());
             assertThat(e.getMessage(), containsString(failureCauseFordeleteEdge));