Removing deprecated DMAAP library
[policy/drools-pdp.git] / feature-pooling-messages / src / test / java / org / onap / policy / drools / pooling / message / LeaderTest.java
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018 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.drools.pooling.message;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-public class LeaderTest extends SupportMessageWithAssignmentsTester<Leader> {
+class LeaderTest extends SupportMessageWithAssignmentsTester<Leader> {
 
     public LeaderTest() {
         super(Leader.class);
     }
 
-    @Before
+    @BeforeEach
     public void setUp() {
         setNullAssignments(false);
     }
@@ -38,17 +39,16 @@ public class LeaderTest extends SupportMessageWithAssignmentsTester<Leader> {
      * The superclass will already invoke testCheckValidity_InvalidFields() to
      * verify that things work with a fully populated message. This verifies
      * that it also works if the assignments are null.
-     * 
-     * @throws Exception if an error occurs
+     *
      */
     @Test
-    public void testCheckValidity_InvalidFields_NullAssignments() throws Exception {
+    void testCheckValidity_InvalidFields_NullAssignments() {
         // null assignments are invalid
         expectCheckValidityFailure(msg -> msg.setAssignments(null));
     }
 
     @Test
-    public void testCheckValidity_SourceIsNotLeader() throws Exception {
+    void testCheckValidity_SourceIsNotLeader() {
         Leader ldr = makeValidMessage();
 
         ldr.setSource("xyz");