diff options
Diffstat (limited to 'models-sim/policy-models-sim-pdp')
-rw-r--r-- | models-sim/policy-models-sim-pdp/pom.xml | 4 | ||||
-rw-r--r-- | models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/TestPdpSimulatorConstants.java | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/models-sim/policy-models-sim-pdp/pom.xml b/models-sim/policy-models-sim-pdp/pom.xml index a18f6f8ef..6f507170b 100644 --- a/models-sim/policy-models-sim-pdp/pom.xml +++ b/models-sim/policy-models-sim-pdp/pom.xml @@ -45,8 +45,8 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-api-mockito2</artifactId> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/TestPdpSimulatorConstants.java b/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/TestPdpSimulatorConstants.java index 491664498..10d7d9f68 100644 --- a/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/TestPdpSimulatorConstants.java +++ b/models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/TestPdpSimulatorConstants.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. + * Copyright (C) 2019,2023 Nordix Foundation. * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,8 +23,8 @@ package org.onap.policy.models.sim.pdp; import static org.assertj.core.api.Assertions.assertThatCode; +import java.lang.reflect.Constructor; import org.junit.Test; -import org.powermock.reflect.Whitebox; /** * Class to perform unit test of {@link PdpSimulatorConstants}}. @@ -35,6 +35,11 @@ public class TestPdpSimulatorConstants { @Test public void test() throws Exception { // verify that constructor does not throw an exception - assertThatCode(() -> Whitebox.invokeConstructor(PdpSimulatorConstants.class)).doesNotThrowAnyException(); + assertThatCode(() -> { + Constructor<PdpSimulatorConstants> c = PdpSimulatorConstants.class.getDeclaredConstructor(); + c.setAccessible(true); + c.newInstance(); + } + ).doesNotThrowAnyException(); } } |