From 1e82ff4b693e2920dfde67cdfc30bf0648f1b097 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 31 Jan 2023 10:43:09 +0000 Subject: 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: Ia61e137f7f7b7807f376d894be05d1c357a86bdd Signed-off-by: liamfallon --- applications/common/pom.xml | 5 +++-- .../pdp/xacml/application/common/ToscaPolicyTranslatorUtilsTest.java | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'applications/common') diff --git a/applications/common/pom.xml b/applications/common/pom.xml index d7e2b603..ce960811 100644 --- a/applications/common/pom.xml +++ b/applications/common/pom.xml @@ -3,6 +3,7 @@ ONAP ================================================================================ Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. + Modifications Copyright (C) 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. @@ -38,8 +39,8 @@ test - org.powermock - powermock-api-mockito2 + org.mockito + mockito-core test diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/ToscaPolicyTranslatorUtilsTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/ToscaPolicyTranslatorUtilsTest.java index e684cde4..ef74beae 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/ToscaPolicyTranslatorUtilsTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/ToscaPolicyTranslatorUtilsTest.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 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. @@ -116,6 +117,7 @@ public class ToscaPolicyTranslatorUtilsTest { assertThat(((ApplyType) obj).getExpression()).hasSize(2); } + @SuppressWarnings("deprecation") @Test public void testDecodeProperties() throws ToscaPolicyConversionException { Data data = ToscaPolicyTranslatorUtils.decodeProperties(Map.of("value", 20), Data.class); -- cgit 1.2.3-korg