summaryrefslogtreecommitdiffstats
path: root/aai-core/src/test
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-09-21 19:21:35 +0200
committerFiete Ostkamp <fiete.ostkamp@telekom.de>2024-10-07 06:39:15 +0000
commit8d66894a3721b0e826573c87d40bc001cb242cd9 (patch)
tree3c12d0b4d5e4771ae372bca637afc3ec6fd69239 /aai-core/src/test
parent6cc66cadc9db495883ce1211c1a0f712e77f8bc7 (diff)
Update Janusgraph to 1.0.0
- update Janusgraph (0.6.4 -> 1.0.0) - update Tinkerpop (3.5.8 -> 3.7.1) Issue-ID: AAI-3743 Change-Id: I5f2f929645b8f327bc90eabab6c06a6b80bdbc3e Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-core/src/test')
-rw-r--r--aai-core/src/test/java/org/onap/aai/util/StoreNotificationEventTest.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/util/StoreNotificationEventTest.java b/aai-core/src/test/java/org/onap/aai/util/StoreNotificationEventTest.java
index a0c3f639..7d3a19d4 100644
--- a/aai-core/src/test/java/org/onap/aai/util/StoreNotificationEventTest.java
+++ b/aai-core/src/test/java/org/onap/aai/util/StoreNotificationEventTest.java
@@ -25,12 +25,11 @@ import static org.junit.Assert.assertTrue;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
import java.io.IOException;
-import javax.json.Json;
-import javax.json.JsonObject;
-
import org.eclipse.persistence.dynamic.DynamicEntity;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
import org.junit.Before;
@@ -51,6 +50,8 @@ public class StoreNotificationEventTest extends AAISetup {
private static AAIKafkaEventJMSProducer producer;
private static StoreNotificationEvent sne;
+ private final ObjectMapper mapper = new ObjectMapper();
+
@BeforeClass
public static void setUp() {
producer = Mockito.mock(AAIKafkaEventJMSProducer.class);
@@ -77,7 +78,8 @@ public class StoreNotificationEventTest extends AAISetup {
@Test
public void testStoreEventEmptyEventHeader()
throws AAIException, JsonGenerationException, JsonMappingException, IOException {
- JsonObject object = Json.createObjectBuilder().add("hello", "world").build();
+
+ ObjectNode object = mapper.createObjectNode().put("hello", "world");
String res = sne.storeEventAndSendToJms(new EventHeader(), object);
assertNotNull(res);
@@ -98,14 +100,12 @@ public class StoreNotificationEventTest extends AAISetup {
assertTrue(res.contains("\"entity-link\" : \"UNK\""));
assertTrue(res.contains("\"entity\""));
assertTrue(res.contains("\"hello\""));
- assertTrue(res.contains("\"chars\" : \"world\""));
- assertTrue(res.contains("\"string\" : \"world\""));
- assertTrue(res.contains("\"valueType\" : \"STRING\""));
+ assertTrue(res.contains("\"world\""));
}
@Test
public void testStoreEvent() throws AAIException, JsonGenerationException, JsonMappingException, IOException {
- JsonObject object = Json.createObjectBuilder().add("hello", "world").build();
+ ObjectNode object = mapper.createObjectNode().put("hello", "world");
EventHeader eh = new EventHeader();
eh.setId("123");
eh.setTimestamp("current-time");
@@ -135,9 +135,7 @@ public class StoreNotificationEventTest extends AAISetup {
assertTrue(res.contains("\"entity-link\" : \"entity-link\""));
assertTrue(res.contains("\"entity\""));
assertTrue(res.contains("\"hello\""));
- assertTrue(res.contains("\"chars\" : \"world\""));
- assertTrue(res.contains("\"string\" : \"world\""));
- assertTrue(res.contains("\"valueType\" : \"STRING\""));
+ assertTrue(res.contains("\"world\""));
}
@Test(expected = AAIException.class)