From 683a4a788de041d390d57c5a8f71c4d83fff8820 Mon Sep 17 00:00:00 2001 From: rameshiyer27 Date: Wed, 17 Jul 2024 09:12:52 +0100 Subject: Apex pdp code improvements Fix compilation issues in windows Replace Acm policy with kafka coverage improvements Issue-ID: POLICY-5059 Signed-off-by: zrrmmua Change-Id: Idfac722cce2d1a2fa471e8c77286006bd883e9a7 --- .../threading/MessageExceptionTest.java | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 core/src/test/java/org/onap/policy/apex/core/infrastructure/threading/MessageExceptionTest.java (limited to 'core') diff --git a/core/src/test/java/org/onap/policy/apex/core/infrastructure/threading/MessageExceptionTest.java b/core/src/test/java/org/onap/policy/apex/core/infrastructure/threading/MessageExceptionTest.java new file mode 100644 index 000000000..c28e322fe --- /dev/null +++ b/core/src/test/java/org/onap/policy/apex/core/infrastructure/threading/MessageExceptionTest.java @@ -0,0 +1,40 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2024 Nordix Foundation. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.core.infrastructure.threading; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; +import org.onap.policy.apex.core.infrastructure.messaging.MessagingException; + + +class MessageExceptionTest { + + @Test + void testMessageException() { + var exception = new MessagingException("Test error"); + assertEquals("Test error", exception.getMessage()); + + var exception2 = new MessagingException("Test error2", new NullPointerException()); + assertThat(exception2).isInstanceOf(MessagingException.class).hasMessage("Test error2"); + } +} -- cgit 1.2.3-korg