diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java
index 6bc1b4a0e6ae..ef1542ba4b6d 100644
--- a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java
+++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java
@@ -4,11 +4,10 @@
import com.azure.core.util.configuration.ConfigurationManager;
import com.azure.core.test.utils.TestResourceNamer;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.rules.TestName;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,7 +31,7 @@ public abstract class TestBase {
* Before tests are executed, determines the test mode by reading the {@link TestBase#AZURE_TEST_MODE} environment
* variable. If it is not set, {@link TestMode#PLAYBACK}
*/
- @BeforeClass
+ @BeforeAll
public static void setupClass() {
testMode = initializeTestMode();
}
@@ -41,7 +40,7 @@ public static void setupClass() {
* Sets-up the {@link TestBase#testResourceNamer} and {@link TestBase#interceptorManager} before each test case is run.
* Then calls its implementing class to perform any other set-up commands.
*/
- @Before
+ @BeforeEach
public void setupTest() {
final String testName = testName();
if (logger.isInfoEnabled()) {
@@ -54,7 +53,7 @@ public void setupTest() {
if (logger.isErrorEnabled()) {
logger.error("Could not create interceptor for {}", testName, e);
}
- Assert.fail();
+ Assertions.fail();
}
testResourceNamer = new TestResourceNamer(testName, testMode, interceptorManager.getRecordedData());
@@ -64,7 +63,7 @@ public void setupTest() {
/**
* Disposes of {@link InterceptorManager} and its inheriting class' resources.
*/
- @After
+ @AfterEach
public void teardownTest() {
afterTest();
interceptorManager.close();
@@ -82,7 +81,7 @@ public TestMode getTestMode() {
/**
* Gets the name of the current test being run.
*
- * NOTE: This could not be implemented in the base class using {@link TestName} because it always returns {@code
+ * NOTE: This could not be implemented in the base class using TestName because it always returns {@code
* null}. See https://stackoverflow.com/a/16113631/4220757.
*
* @return The name of the current test.
diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml
index 33deba0573e1..899ed32bd787 100644
--- a/sdk/core/azure-core/pom.xml
+++ b/sdk/core/azure-core/pom.xml
@@ -104,8 +104,8 @@