Removing deprecated DMAAP library
[policy/drools-pdp.git] / policy-core / src / test / java / org / onap / policy / drools / core / lock / AlwaysSuccessLockTest.java
index 3288948..80f81f9 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 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.
@@ -22,24 +23,24 @@ package org.onap.policy.drools.core.lock;
 
 import static org.assertj.core.api.Assertions.assertThatCode;
 import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.Mockito.mock;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-public class AlwaysSuccessLockTest extends AlwaysLockBaseTest<AlwaysSuccessLock> {
+class AlwaysSuccessLockTest extends AlwaysLockBaseTest<AlwaysSuccessLock> {
 
-    @Before
+    @BeforeEach
     public void setUp() {
         callback = mock(LockCallback.class);
         lock = new AlwaysSuccessLock(RESOURCE, OWNER_KEY, HOLD_SEC, callback);
     }
 
     @Test
-    public void testAlwaysSuccessLockConstructors() {
+    void testAlwaysSuccessLockConstructors() {
         assertThatCode(AlwaysSuccessLock::new).doesNotThrowAnyException();
         assertThatCode(() -> new AlwaysSuccessLock(LockState.ACTIVE, RESOURCE, OWNER_KEY, HOLD_SEC, callback))
             .doesNotThrowAnyException();
@@ -48,18 +49,18 @@ public class AlwaysSuccessLockTest extends AlwaysLockBaseTest<AlwaysSuccessLock>
     }
 
     @Test
-    public void testActiveLock() {
+    void testActiveLock() {
         assertTrue(lock.isActive());
     }
 
     @Test
-    public void testFree() {
+    void testFree() {
         assertTrue(lock.free());
         assertTrue(lock.isActive());
     }
 
     @Test
-    public void testExtend() {
+    void testExtend() {
         LockCallback callback2 = mock(LockCallback.class);
         lock.extend(HOLD_SEC2, callback2);