X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=models-interactions%2Fmodel-actors%2Factor.xacml%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcontrolloop%2Factor%2Fxacml%2FGuardOperationTest.java;h=05f64baa7aeca78b34e784d54dbf3382676058dc;hb=e3938e43b8a1f02f74368ecb75c38530285feac0;hp=2988d695bd392837a692656602a67d4217bcc4cf;hpb=4f963eabf3d7b62122301a1901450298612dcf8f;p=policy%2Fmodels.git diff --git a/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/GuardOperationTest.java b/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/GuardOperationTest.java index 2988d695b..05f64baa7 100644 --- a/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/GuardOperationTest.java +++ b/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/GuardOperationTest.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020-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. @@ -36,7 +37,9 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.runner.RunWith; import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams; import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance; import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance; @@ -48,6 +51,7 @@ import org.onap.policy.models.decisions.concepts.DecisionRequest; import org.onap.policy.models.decisions.concepts.DecisionResponse; import org.onap.policy.simulators.XacmlSimulatorJaxRs; +@RunWith(MockitoJUnitRunner.class) public class GuardOperationTest extends BasicHttpOperation { @Mock @@ -107,7 +111,8 @@ public class GuardOperationTest extends BasicHttpOperation { */ @Test public void testSuccess() throws Exception { - DecisionParams opParams = DecisionParams.builder().clientName(MY_CLIENT).path("decision").build(); + DecisionParams opParams = + DecisionParams.builder().clientName(MY_CLIENT).path("decision").action("guard").build(); config = new DecisionConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory()); params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build(); @@ -123,7 +128,8 @@ public class GuardOperationTest extends BasicHttpOperation { */ @Test public void testFailure() throws Exception { - DecisionParams opParams = DecisionParams.builder().clientName(MY_CLIENT).path("decision").build(); + DecisionParams opParams = + DecisionParams.builder().clientName(MY_CLIENT).path("decision").action("guard").build(); config = new DecisionConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory()); params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor)