Convert models to JUnit 5
[policy/models.git] / models-interactions / model-impl / aai / src / test / java / org / onap / policy / aai / AaiManagerTest.java
index 9b20fe9..1d8253c 100644 (file)
@@ -3,7 +3,7 @@
  * aai
  * ================================================================================
  * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,9 +21,9 @@
 
 package org.onap.policy.aai;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.mockito.ArgumentMatchers.anyMap;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.contains;
@@ -38,11 +38,11 @@ import java.nio.file.Files;
 import java.util.Map;
 import java.util.UUID;
 import org.apache.commons.lang3.tuple.Pair;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.onap.policy.rest.RestManager;
 
-public class AaiManagerTest {
+class AaiManagerTest {
     private static final String CQ_QUERY_URL = "http://testing.cq.query";
     private static final String DOROTHY = "Dorothy";
     private static final String SOME_URL = "http://somewhere.over.the.rainbow";
@@ -60,8 +60,8 @@ public class AaiManagerTest {
      *
      * @throws Exception if error occurs
      */
-    @Before
-    public void beforeTestAaiManager() throws Exception {
+    @BeforeEach
+    void beforeTestAaiManager() throws Exception {
         restManagerMock = mock(RestManager.class);
 
         String aaiCqResponse = new AaiCqResponseTest().getAaiCqResponse();
@@ -75,7 +75,7 @@ public class AaiManagerTest {
 
 
     @Test
-    public void testAaiCqResponse() {
+    void testAaiCqResponse() {
         AaiManager aaiManager = new AaiManager(restManagerMock);
         assertNotNull(aaiManager);
 
@@ -115,7 +115,7 @@ public class AaiManagerTest {
 
 
     @Test
-    public void testAaiManagerGetPnf() {
+    void testAaiManagerGetPnf() {
         AaiManager aaiManager = new AaiManager(restManagerMock);
         assertNotNull(aaiManager);
         String pnfName = "test-pnf";