aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorHOCKLA <ah999m@att.com>2020-01-14 11:39:47 -0600
committerHOCKLA <ah999m@att.com>2020-01-14 13:54:25 -0600
commit82b162be29015ac529d9e29d0f5ee21d7fc24ecb (patch)
tree40fd7c4ad128a53cd050c9f084781d4bde5cbf5c /main
parentac087ee497e2e9f10e1de20290bf39b5e5303782 (diff)
policy/xacml-pdp jdk11 upgrades
Issue-ID: POLICY-1596 Change-Id: I00164ea17eb9d547b45c01e5f46f7aaf0f9a25e2 Signed-off-by: HOCKLA <ah999m@att.com>
Diffstat (limited to 'main')
-rw-r--r--main/pom.xml4
-rw-r--r--main/src/test/java/org/onap/policy/pdpx/main/comm/XacmlPdpHearbeatPublisherTest.java17
2 files changed, 10 insertions, 11 deletions
diff --git a/main/pom.xml b/main/pom.xml
index 98c12e8a..4dce052c 100644
--- a/main/pom.xml
+++ b/main/pom.xml
@@ -2,7 +2,7 @@
============LICENSE_START=======================================================
ONAP Policy Engine - XACML PDP
================================================================================
- Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2019-2020 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.
@@ -100,7 +100,7 @@
</dependency>
<dependency>
<groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
+ <artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/main/src/test/java/org/onap/policy/pdpx/main/comm/XacmlPdpHearbeatPublisherTest.java b/main/src/test/java/org/onap/policy/pdpx/main/comm/XacmlPdpHearbeatPublisherTest.java
index 3478ef3a..f391605a 100644
--- a/main/src/test/java/org/onap/policy/pdpx/main/comm/XacmlPdpHearbeatPublisherTest.java
+++ b/main/src/test/java/org/onap/policy/pdpx/main/comm/XacmlPdpHearbeatPublisherTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -23,10 +23,9 @@ package org.onap.policy.pdpx.main.comm;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyLong;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -134,17 +133,17 @@ public class XacmlPdpHearbeatPublisherTest {
// null interval - no changes
publisher.restart(null);
- verify(executor, times(1)).scheduleWithFixedDelay(any(), anyInt(), anyLong(), any());
+ verify(executor, times(1)).scheduleWithFixedDelay(any(), anyLong(), anyLong(), any());
assertSame(timer2, timers.peek());
// same interval - no changes
publisher.restart(INTERVAL1);
- verify(executor, times(1)).scheduleWithFixedDelay(any(), anyInt(), anyLong(), any());
+ verify(executor, times(1)).scheduleWithFixedDelay(any(), anyLong(), anyLong(), any());
assertSame(timer2, timers.peek());
// invalid interval - no changes
publisher.restart(INTERVAL_INVALID);
- verify(executor, times(1)).scheduleWithFixedDelay(any(), anyInt(), anyLong(), any());
+ verify(executor, times(1)).scheduleWithFixedDelay(any(), anyLong(), anyLong(), any());
assertSame(timer2, timers.peek());
// new interval - old timer should be cancelled and new started
@@ -162,7 +161,7 @@ public class XacmlPdpHearbeatPublisherTest {
// repeat - nothing more should happen
publisher.start();
- verify(executor, times(1)).scheduleWithFixedDelay(any(), anyInt(), anyLong(), any());
+ verify(executor, times(1)).scheduleWithFixedDelay(any(), anyLong(), anyLong(), any());
verify(timer1, never()).cancel(anyBoolean());
}