diff options
author | liamfallon <liam.fallon@est.tech> | 2023-01-31 10:42:20 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2023-01-31 12:25:52 +0000 |
commit | 6763c4b787593fa0a11668971ba2cb5cc87ad4c5 (patch) | |
tree | d146a1268f7168ed37e69de71f0b433f7a924031 /main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java | |
parent | 1b5c2ceafbe9b62e6c697db63f36d2b965402067 (diff) |
Upgrade and clean up dependencies
- Upgrade Hibernate
- Upgrade Mockito
- Upgrade Mockserver
- Remove Powermock (no longer supported) and replace with spring-test ReflectionTestUtils
- Upgrade Spring Framework
- Add spring-security to allow authentication on unit tests using MockMVC
Minor clean-up
- Replace deprecated authorization configuraiton on spring boot applications with SecurityFilterChain bean
- Change @LocalPort include on tests to use test include rather than runtime include
- Remove unused imports
- Remove unused constants and variables
- Add deprecation annotations where required
Issue-ID: POLICY-4482
Change-Id: Ifcabd73e4130810ba2a99b842ffa4203836c0682
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java b/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java index 6ff989cd..40284496 100644 --- a/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java +++ b/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java @@ -3,7 +3,7 @@ * ONAP PAP * ================================================================================ * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2020-2021 Nordix Foundation. + * Modifications Copyright (C) 2020-2021,2023 Nordix Foundation. * Modifications Copyright (C) 2022 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -73,7 +73,7 @@ import org.onap.policy.pap.main.comm.msgdata.RequestListener; import org.onap.policy.pap.main.parameters.PdpModifyRequestMapParams; import org.onap.policy.pap.main.service.PdpGroupService; import org.onap.policy.pap.main.service.PolicyStatusService; -import org.powermock.reflect.Whitebox; +import org.springframework.test.util.ReflectionTestUtils; @RunWith(MockitoJUnitRunner.class) public class PdpModifyRequestMapTest extends CommonRequestBase { @@ -148,8 +148,8 @@ public class PdpModifyRequestMapTest extends CommonRequestBase { @Test public void testPdpModifyRequestMap() { - assertSame(mapParams, Whitebox.getInternalState(map, "params")); - assertSame(lock, Whitebox.getInternalState(map, "modifyLock")); + assertSame(mapParams, ReflectionTestUtils.getField(map, "params")); + assertSame(lock, ReflectionTestUtils.getField(map, "modifyLock")); } @Test @@ -726,7 +726,7 @@ public class PdpModifyRequestMapTest extends CommonRequestBase { * @return the request's listener */ private RequestListener getListener(Request request) { - return Whitebox.getInternalState(request, "listener"); + return (RequestListener) ReflectionTestUtils.getField(request, "listener"); } private PdpGroup makeGroup(String name) { |