From 82b162be29015ac529d9e29d0f5ee21d7fc24ecb Mon Sep 17 00:00:00 2001 From: HOCKLA Date: Tue, 14 Jan 2020 11:39:47 -0600 Subject: policy/xacml-pdp jdk11 upgrades Issue-ID: POLICY-1596 Change-Id: I00164ea17eb9d547b45c01e5f46f7aaf0f9a25e2 Signed-off-by: HOCKLA --- .../pdpx/main/comm/XacmlPdpHearbeatPublisherTest.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'main/src') 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()); } -- cgit 1.2.3-korg