diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
index 12e3618e1e606..6d1402dbe0894 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
@@ -95,11 +95,5 @@
2.45.0
test
-
- com.azure.resourcemanager
- azure-resourcemanager-resources
- 2.45.0
- test
-
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/ResourceHealthTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/ResourceHealthTests.java
index b2901efde118a..e0265bf01c1a2 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/ResourceHealthTests.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/ResourceHealthTests.java
@@ -55,12 +55,12 @@ public void resourceHealthTest() {
ComputeManager computeManager = ComputeManager.configure()
.withPolicy(new ProviderRegistrationPolicy(resourceManager))
.withLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC))
- .authenticate(new AzurePowerShellCredentialBuilder().build(), new AzureProfile(AzureEnvironment.AZURE));
+ .authenticate(credential, profile);
ResourceHealthManager resourceHealthManager = ResourceHealthManager.configure()
.withPolicy(new ProviderRegistrationPolicy(resourceManager))
.withLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS))
- .authenticate(new AzurePowerShellCredentialBuilder().build(), new AzureProfile(AzureEnvironment.AZURE));
+ .authenticate(credential, profile);
String testResourceGroup = Configuration.getGlobalConfiguration().get("AZURE_RESOURCE_GROUP_NAME");
boolean testEnv = !CoreUtils.isNullOrEmpty(testResourceGroup);