First part of Tests
[vid.git] / vid-app-common / src / test / java / org / onap / vid / aai / AaiOverTLSClientTest.java
index 52556a1..43fb5a3 100644 (file)
@@ -2,14 +2,14 @@
  * ============LICENSE_START=======================================================
  * VID
  * ================================================================================
- * Copyright (C) 2018 Nokia Intellectual Property. All rights reserved.
+ * Copyright (C) 2018 - 2019 Nokia 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.
  * You may obtain a copy of the License at
- *
+ * 
  *      http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 package org.onap.vid.aai;
 
 import com.google.common.collect.ImmutableMap;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
 import org.mockito.Answers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
-import org.mockito.junit.MockitoJUnitRunner;
+
 import org.onap.vid.aai.model.ResourceType;
 import org.onap.vid.client.SyncRestClient;
 import org.onap.vid.model.SubscriberList;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
 
 import java.util.Collections;
 import java.util.Map;
 
 import static org.mockito.ArgumentMatchers.contains;
 import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.MockitoAnnotations.initMocks;
 
-@RunWith(MockitoJUnitRunner.class)
 public class AaiOverTLSClientTest {
 
     private static final String SEARCH_NODES_QUERY_SEARCH_NODE_TYPE = "nodes/generic-vnfs?vnf-name=name";
@@ -50,8 +49,9 @@ public class AaiOverTLSClientTest {
     @Mock
     private AaiOverTLSPropertySupplier propertySupplier;
 
-    @Before
+    @BeforeMethod
     public void setUp() {
+        initMocks(this);
         aaiRestClient = new AaiOverTLSClient(syncRestClient,  propertySupplier);
     }
 
@@ -86,4 +86,4 @@ public class AaiOverTLSClientTest {
             put("X-TransactionId", "2").put("Content-Type", "application/json").build();
     }
 
-}
\ No newline at end of file
+}