Fix sonars from dependency upgrade
[policy/xacml-pdp.git] / main / src / test / java / org / onap / policy / pdpx / main / comm / XacmlPdpPapRegistrationTest.java
index 9f35f53..9f4d80b 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.
@@ -25,12 +25,14 @@ import static org.mockito.Mockito.when;
 
 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.common.endpoints.event.comm.client.TopicSinkClient;
 import org.onap.policy.common.endpoints.event.comm.client.TopicSinkClientException;
 import org.onap.policy.models.pdp.concepts.PdpStatus;
 
+@RunWith(MockitoJUnitRunner.class)
 public class XacmlPdpPapRegistrationTest {
 
     @Mock
@@ -46,8 +48,6 @@ public class XacmlPdpPapRegistrationTest {
      */
     @Before
     public void setUp() {
-        MockitoAnnotations.initMocks(this);
-
         when(client.send(status)).thenReturn(true);
 
         reg = new XacmlPdpPapRegistration(client);