diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2023-08-17 22:09:58 +0100 |
---|---|---|
committer | adheli.tavares <adheli.tavares@est.tech> | 2023-08-17 22:10:28 +0100 |
commit | 08d36423f39ad97783221b6144111a663b6fbfc8 (patch) | |
tree | 2df4d626cb4a303c5051e0c988fb40e6de76aa74 /main/src/test/java/org/onap/policy/pap/main/comm/MultiPdpStatusListenerTest.java | |
parent | eb4cf2ad5d004cbfda90a752d10fbc6e91ef8fb4 (diff) |
Java 17 / Spring 6 / Spring Boot 3 Upgrade
Issue-ID: POLICY-4671
Change-Id: I249416af830db638a314325e45948015a21134d4
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'main/src/test/java/org/onap/policy/pap/main/comm/MultiPdpStatusListenerTest.java')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/comm/MultiPdpStatusListenerTest.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/comm/MultiPdpStatusListenerTest.java b/main/src/test/java/org/onap/policy/pap/main/comm/MultiPdpStatusListenerTest.java index 4f276a90..beb0697e 100644 --- a/main/src/test/java/org/onap/policy/pap/main/comm/MultiPdpStatusListenerTest.java +++ b/main/src/test/java/org/onap/policy/pap/main/comm/MultiPdpStatusListenerTest.java @@ -3,7 +3,7 @@ * ONAP PAP * ================================================================================ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2021 Nordix Foundation. + * Modifications Copyright (C) 2021, 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,21 +21,21 @@ package org.onap.policy.pap.main.comm; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure; import org.onap.policy.models.pdp.concepts.PdpResponseDetails; import org.onap.policy.models.pdp.concepts.PdpStatus; -public class MultiPdpStatusListenerTest { +class MultiPdpStatusListenerTest { private static final CommInfrastructure INFRA = CommInfrastructure.NOOP; private static final String TOPIC = "my-topic"; private static final String ID1 = "request-1"; @@ -46,16 +46,16 @@ public class MultiPdpStatusListenerTest { private PdpStatus status; @Test - public void testMultiPdpStatusListenerString() throws Exception { + void testMultiPdpStatusListenerString() throws Exception { listener = new MyListener(ID1); - assertEquals(Arrays.asList(ID1).toString(), listener.getUnseenIds().toString()); + assertEquals(List.of(ID1).toString(), listener.getUnseenIds().toString()); // an ID is in the queue - not done yet assertFalse(doWait(0)); } @Test - public void testMultiPdpStatusListenerCollectionOfString() throws Exception { + void testMultiPdpStatusListenerCollectionOfString() throws Exception { List<String> lst = ID_LIST; listener = new MyListener(lst); @@ -73,7 +73,7 @@ public class MultiPdpStatusListenerTest { } @Test - public void testGetUnseenIds() { + void testGetUnseenIds() { List<String> lst = ID_LIST; listener = new MyListener(lst); @@ -83,7 +83,7 @@ public class MultiPdpStatusListenerTest { status = new PdpStatus(); status.setResponse(makeResponse(ID2)); listener.onTopicEvent(INFRA, TOPIC, status); - assertEquals(Arrays.asList(ID1).toString(), listener.getUnseenIds().toString()); + assertEquals(List.of(ID1).toString(), listener.getUnseenIds().toString()); // receive message from the other PDP status = new PdpStatus(); @@ -93,7 +93,7 @@ public class MultiPdpStatusListenerTest { } @Test - public void testAwait() throws Exception { + void testAwait() throws Exception { // try with an empty list - should already be complete listener = new MyListener(new LinkedList<>()); assertTrue(doWait(0)); @@ -120,7 +120,7 @@ public class MultiPdpStatusListenerTest { } @Test - public void testOnTopicEvent() throws Exception { + void testOnTopicEvent() throws Exception { listener = new MyListener(ID_LIST); // not done yet |