diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/pom.xml | 4 | ||||
-rw-r--r-- | main/src/test/java/org/onap/policy/pdpx/main/comm/XacmlPdpHearbeatPublisherTest.java | 17 |
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()); } |