Merge "Use new version of A&AI APIs"
[policy/models.git] / models-sim / policy-models-simulators / src / test / java / org / onap / policy / models / simulators / MainTest.java
index f5598e2..bb4fa7c 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -145,11 +145,11 @@ public class MainTest {
                         .allowSelfSignedCerts(true).basePath("aai").build();
         HttpClient client = HttpClientFactoryInstance.getClientFactory().build(params);
 
-        Response response = client.get("/v8/network/generic-vnfs/generic-vnf/my-vnf");
+        Response response = client.get("/v21/network/pnfs/pnf/demo-pnf");
         assertEquals(200, response.getStatus());
 
         String result = response.readEntity(String.class);
-        assertThat(result).contains("USUCP0PCOIL0110UJZZ01-vsrx");
+        assertThat(result).contains("model-123456");
     }
 
     /**
@@ -242,7 +242,8 @@ public class MainTest {
      */
     @Test
     public void testBuildTopicServerInvalidProvider() {
-        assertThatThrownBy(() -> new Main("invalidTopicServer.json").start());
+        assertThatThrownBy(() -> new Main("invalidTopicServer.json").start())
+                        .hasCauseInstanceOf(IllegalArgumentException.class);
     }
 
     /**
@@ -250,7 +251,8 @@ public class MainTest {
      */
     @Test
     public void testBuildTopicServerNoSink() {
-        assertThatThrownBy(() -> new Main("missingSink.json").start());
+        assertThatThrownBy(() -> new Main("missingSink.json").start())
+                        .hasCauseInstanceOf(IllegalArgumentException.class);
     }
 
     /**
@@ -258,6 +260,7 @@ public class MainTest {
      */
     @Test
     public void testBuildTopicServerNoSource() {
-        assertThatThrownBy(() -> new Main("missingSource.json").start());
+        assertThatThrownBy(() -> new Main("missingSource.json").start())
+                        .hasCauseInstanceOf(IllegalArgumentException.class);
     }
 }