Fix sonars from dependency upgrade
[policy/xacml-pdp.git] / applications / common / src / test / java / org / onap / policy / pdp / xacml / application / common / std / StdMatchablePolicyRequestTest.java
index f259c20..57ab227 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019, 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.
@@ -34,12 +34,14 @@ import java.util.Map;
 import java.util.TreeMap;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.policy.models.decisions.concepts.DecisionRequest;
 import org.onap.policy.pdp.xacml.application.common.ToscaDictionary;
 import org.onap.policy.pdp.xacml.application.common.XacmlApplicationException;
 
+@RunWith(MockitoJUnitRunner.class)
 public class StdMatchablePolicyRequestTest {
     private static final String ACTION = "my-action";
     private static final String ONAP_NAME = "my-name";
@@ -62,8 +64,6 @@ public class StdMatchablePolicyRequestTest {
      */
     @Before
     public void setUp() {
-        MockitoAnnotations.initMocks(this);
-
         resources = new TreeMap<>();
 
         when(decreq.getResource()).thenReturn(resources);