import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.runner.RunWith;
-import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.resources.ResourceUtils;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.policy.controlloop.actorserviceprovider.topic.BidirectionalTopicHandler;
import org.onap.policy.controlloop.actorserviceprovider.topic.BidirectionalTopicManager;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.junit.jupiter.MockitoExtension;
@ExtendWith(MockitoExtension.class)
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>compile</scope>
+ <artifactId>mockito-junit-jupiter</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
* simulators
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.simulators;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
import java.util.UUID;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import org.onap.policy.aai.AaiCqResponse;
import org.onap.policy.aai.AaiManager;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
import org.onap.policy.rest.RestManager;
-public class AaiSimulatorTest {
+class AaiSimulatorTest {
/**
* Set up test class.
*/
- @BeforeClass
+ @BeforeAll
public static void setUpSimulator() {
try {
var testServer = Util.buildAaiSim();
}
}
- @AfterClass
+ @AfterAll
public static void tearDownSimulator() {
HttpServletServerFactoryInstance.getServerFactory().destroy();
}
@Test
- public void testCqGet() {
+ void testCqGet() {
final AaiCqResponse response = new AaiManager(new RestManager()).getCustomQueryResponse("http://localhost:6666",
"testUser", "testPass", UUID.randomUUID(), "Ete_vFWCLvFWSNK_7ba1fbde_0");
assertNotNull(response);
package org.onap.policy.simulators;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.event.comm.TopicSource;
import org.onap.policy.common.utils.resources.ResourceUtils;
-@RunWith(MockitoJUnitRunner.class)
-public class AppcLcmTopicServerTest {
+@ExtendWith(MockitoExtension.class)
+class AppcLcmTopicServerTest {
private static final String MY_TOPIC = "my-topic";
@Mock
/**
* Sets up.
*/
- @Before
+ @BeforeEach
public void setUp() {
server = new AppcLcmTopicServer(sink, source);
}
@Test
- public void testProcessAppcLcmMessageWrapper() {
+ void testProcessAppcLcmMessageWrapper() {
String request = ResourceUtils.getResourceAsString("org/onap/policy/simulators/appclcm/appc.lcm.request.json");
assertNotNull(request);
* Tests process() when the message is a response.
*/
@Test
- public void testProcessNoResponse() {
+ void testProcessNoResponse() {
// NOTE: this json file is a RESPONSE, not a request
String request = ResourceUtils.getResourceAsString("org/onap/policy/simulators/appclcm/appc.lcm.success.json");
assertNotNull(request);
* ONAP
* ================================================================================
* Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.simulators;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.event.comm.TopicSource;
import org.onap.policy.common.utils.resources.ResourceUtils;
-@RunWith(MockitoJUnitRunner.class)
-public class AppcLegacyTopicServerTest {
+@ExtendWith(MockitoExtension.class)
+class AppcLegacyTopicServerTest {
private static final String MY_TOPIC = "my-topic";
@Mock
/**
* Sets up.
*/
- @Before
+ @BeforeEach
public void setUp() {
server = new AppcLegacyTopicServer(sink, source);
}
@Test
- public void testProcess() {
+ void testProcess() {
String request = ResourceUtils.getResourceAsString("org/onap/policy/simulators/appc/appc.legacy.request.json");
assertNotNull(request);
* Tests process() when the message is a response.
*/
@Test
- public void testProcessNoResponse() {
+ void testProcessNoResponse() {
// NOTE: this json file is a RESPONSE, not a request
String request = ResourceUtils.getResourceAsString("org/onap/policy/simulators/appc/appc.legacy.success.json");
assertNotNull(request);
* ================================================================================
* Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020-2021 Bell Canada. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.simulators;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import com.google.protobuf.TextFormat.ParseException;
import com.google.protobuf.util.JsonFormat;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.IOUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc.BluePrintProcessingServiceStub;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput;
import org.onap.policy.common.utils.network.NetworkUtil;
import org.onap.policy.common.utils.resources.ResourceUtils;
-public class CdsSimulatorTest {
+class CdsSimulatorTest {
private static final StandardCoder coder = new StandardCoder();
private CdsSimulator sim;
* Starts the simulator, allocating a unique port for each test so we don't have to
* wait for the prior server to shut down.
*/
- @Before
+ @BeforeEach
public void setUp() throws Exception {
int port = NetworkUtil.allocPort();
sim = new CdsSimulator(Util.LOCALHOST, port);
sim.start();
}
- @After
+ @AfterEach
public void tearDown() {
sim.stop();
}
@Test
- public void test() throws Exception {
+ void test() throws Exception {
String reqstr = IOUtils.toString(Objects.requireNonNull(getClass().getResource("cds/cds.request.json")),
StandardCharsets.UTF_8);
Builder builder = ExecutionServiceInput.newBuilder();
}
@Test
- public void testGetResponse() throws IOException, CoderException, ParseException {
+ void testGetResponse() throws IOException, CoderException, ParseException {
CdsSimulator cdsSimulator = new CdsSimulator(Util.LOCALHOST, sim.getPort());
String reqstr = ResourceUtils.getResourceAsString(
"org/onap/policy/simulators/cds/cds.request.json");
* ONAP
* ================================================================================
* Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.simulators;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.test.ExceptionsTester;
/**
* Tests XxxException classes.
*/
-public class ExceptionsTest {
+class ExceptionsTest {
@Test
- public void testSimulatorRuntimeException() {
+ void testSimulatorRuntimeException() {
assertEquals(4, new ExceptionsTester().test(SimulatorRuntimeException.class));
}
}
* ONAP
* ================================================================================
* Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.simulators;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.event.comm.TopicSource;
import org.onap.policy.common.utils.resources.ResourceUtils;
-@RunWith(MockitoJUnitRunner.class)
-public class SdnrTopicServerTest {
+@ExtendWith(MockitoExtension.class)
+class SdnrTopicServerTest {
private static final String MY_TOPIC = "my-topic";
@Mock
/**
* Sets up.
*/
- @Before
+ @BeforeEach
public void setUp() {
server = new SdnrTopicServer(sink, source);
}
@Test
- public void testProcess() {
+ void testProcess() {
String request = ResourceUtils.getResourceAsString("org/onap/policy/simulators/sdnr/vpci.sdnr.request.json");
assertNotNull(request);
* Tests process() when the message is a response.
*/
@Test
- public void testProcessNoResponse() {
+ void testProcessNoResponse() {
// NOTE: this json file is a RESPONSE, not a request
String request = ResourceUtils.getResourceAsString("org/onap/policy/simulators/sdnr/vpci.sdnr.success.json");
assertNotNull(request);
* simulators
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2024 Nordix Foundation.
* Modifications Copyright (C) 2020 Wipro Limited.
* Modifications Copyright (C) 2022 CTC, Inc. and others.
* ================================================================================
package org.onap.policy.simulators;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
import java.util.HashMap;
import java.util.UUID;
import org.apache.commons.lang3.tuple.Pair;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
import org.onap.policy.rest.RestManager;
import org.onap.policy.so.SoCloudConfiguration;
import org.onap.policy.so.SoRequestParameters;
import org.onap.policy.so.util.Serialization;
-public class SoSimulatorTest {
+class SoSimulatorTest {
/**
* Set up test class.
*/
- @BeforeClass
+ @BeforeAll
public static void setUpSimulator() {
try {
var testServer = Util.buildSoSim();
}
}
- @AfterClass
+ @AfterAll
public static void tearDownSimulator() {
HttpServletServerFactoryInstance.getServerFactory().destroy();
SoSimulatorJaxRs.setRequirePolling(false);
}
@Test
- public void testPost() {
+ void testPost() {
SoSimulatorJaxRs.setRequirePolling(false);
String request = Serialization.gsonPretty.toJson(this.createTestRequest());
Pair<Integer, String> httpDetails = new RestManager().post(
}
@Test
- public void testDelete() {
+ void testDelete() {
SoSimulatorJaxRs.setRequirePolling(false);
String request = Serialization.gsonPretty.toJson(this.createTestRequest());
Pair<Integer, String> httpDetails = new RestManager().delete(
}
@Test
- public void testModifyNssi() {
+ void testModifyNssi() {
SoSimulatorJaxRs.setRequirePolling(false);
String request = Serialization.gsonPretty.toJson(this.createNssiRequest());
Pair<Integer, String> httpDetails = new RestManager().put(
}
@Test
- public void testModifyCll() {
+ void testModifyCll() {
SoSimulatorJaxRs.setRequirePolling(false);
String request = Serialization.gsonPretty.toJson(this.createCllRequest());
Pair<Integer, String> httpDetails = new RestManager().put(
* ONAP
* ================================================================================
* Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.simulators;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.event.comm.TopicSource;
import org.onap.policy.common.utils.coder.StandardCoder;
-@RunWith(MockitoJUnitRunner.class)
-public class TopicServerTest {
+@ExtendWith(MockitoExtension.class)
+class TopicServerTest {
private static final String MY_TOPIC = "my-topic";
private static final String TEXT = "hello";
private static final String RESPONSE = "world";
/**
* Sets up.
*/
- @Before
+ @BeforeEach
public void setUp() {
server = new MyServer();
}
@Test
- public void testConstructor() {
+ void testConstructor() {
verify(source).register(server);
}
@Test
- public void testShutdown() {
+ void testShutdown() {
server.shutdown();
verify(source).unregister(server);
}
@Test
- public void testOnTopicEvent() {
+ void testOnTopicEvent() {
server.onTopicEvent(CommInfrastructure.NOOP, MY_TOPIC, "{\"text\": \"hello\"}");
verify(sink).send(RESPONSE);
}
* Tests onTopicEvent() when the coder throws an exception.
*/
@Test
- public void testOnTopicEventException() {
+ void testOnTopicEventException() {
assertThatIllegalArgumentException()
.isThrownBy(() -> server.onTopicEvent(CommInfrastructure.NOOP, MY_TOPIC, "{invalid json"));
* Tests onTopicEvent() when there is no response.
*/
@Test
- public void testOnTopicEventNoResponse() {
+ void testOnTopicEventNoResponse() {
server = new MyServer() {
@Override
protected String process(MyRequest request) {
* simulators
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.simulators;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
import java.util.HashMap;
import org.apache.commons.lang3.tuple.Pair;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
import org.onap.policy.rest.RestManager;
import org.onap.policy.vfc.VfcResponse;
import org.onap.policy.vfc.util.Serialization;
-public class VfcSimulatorTest {
+class VfcSimulatorTest {
/**
* Set up test class.
*/
- @BeforeClass
+ @BeforeAll
public static void setUpSimulator() {
try {
var testServer = Util.buildVfcSim();
}
}
- @AfterClass
+ @AfterAll
public static void tearDownSimulator() {
HttpServletServerFactoryInstance.getServerFactory().destroy();
}
@Test
- public void testPost() {
+ void testPost() {
final Pair<Integer, String> httpDetails =
new RestManager().post("http://localhost:6668/api/nslcm/v1/ns/1234567890/heal", "username", "password",
new HashMap<>(), "application/json", "Some Request Here");
}
@Test
- public void testGet() {
+ void testGet() {
final Pair<Integer, String> httpDetails = new RestManager().get("http://localhost:6668/api/nslcm/v1/jobs/1234",
"username", "password", new HashMap<>());
assertNotNull(httpDetails);
* simulators
* ================================================================================
* Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.simulators;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang3.tuple.Pair;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.models.decisions.concepts.DecisionResponse;
import org.onap.policy.rest.RestManager;
-public class XacmlSimulatorTest {
+class XacmlSimulatorTest {
private static final StandardCoder coder = new StandardCoder();
/**
* Set up test class.
*/
- @BeforeClass
+ @BeforeAll
public static void setupSimulator() {
try {
var testServer = Util.buildXacmlSim();
}
}
- @AfterClass
+ @AfterAll
public static void tearDownSimulator() {
HttpServletServerFactoryInstance.getServerFactory().destroy();
}
@Test
- public void testGuard() throws CoderException {
+ void testGuard() throws CoderException {
String request = makeGuardRequest("test_actor_id", "test_op_id", "test_target", "test_clName");
DecisionResponse decision = sendRequest(request);
assertEquals("Permit", decision.getStatus());
}
@Test
- public void testConfigure() throws CoderException {
+ void testConfigure() throws CoderException {
// test retrieving a policy
String request = makeConfigureRequest("policy-id", "test-policy");
DecisionResponse decision = sendRequest(request);
}
@Test
- public void testConfigureMissingFile() throws CoderException {
+ void testConfigureMissingFile() throws CoderException {
// test retrieving a policy
String request = makeConfigureRequest("policy-id", "bogus-policy");
DecisionResponse decision = sendRequest(request);
}
@Test
- public void testConfigureInvalidJson() throws CoderException {
+ void testConfigureInvalidJson() throws CoderException {
// test retrieving a policy
String request = makeConfigureRequest("policy-id", "invalid-policy");
DecisionResponse decision = sendRequest(request);
}
@Test
- public void testUnknownAction() throws CoderException {
+ void testUnknownAction() throws CoderException {
String request = makeGuardRequest("test_actor_id", "test_op_id", "test_target", "test_clName");
request = request.replace("guard", "bogus-action");
DecisionResponse decision = sendRequest(request);
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-junit-jupiter</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>