@@ -638,8 +638,6 @@ void managedIdentityTest_WithClaims(ManagedIdentitySourceType source, String end
638638 // Clear caching to avoid cross test pollution.
639639 miApp .tokenCache ().accessTokens .clear ();
640640
641- String claimsJson = "{\" default\" :\" claim\" }" ;
642-
643641 // First call, get the token from the identity provider.
644642 IAuthenticationResult result = miApp .acquireTokenForManagedIdentity (
645643 ManagedIdentityParameters .builder (resource )
@@ -659,7 +657,7 @@ void managedIdentityTest_WithClaims(ManagedIdentitySourceType source, String end
659657 // Third call, when claims are passed bypass the cache.
660658 result = miApp .acquireTokenForManagedIdentity (
661659 ManagedIdentityParameters .builder (resource )
662- .claims (claimsJson )
660+ .claims (TestConfiguration . CLAIMS_REQUEST )
663661 .build ()).get ();
664662
665663 assertNotNull (result .accessToken ());
@@ -689,7 +687,6 @@ void managedIdentity_ClaimsAndCapabilities(ManagedIdentitySourceType source, Str
689687 // Clear caching to avoid cross test pollution.
690688 miApp .tokenCache ().accessTokens .clear ();
691689
692- String claimsJson = "{\" default\" :\" claim\" }" ;
693690 // First call, get the token from the identity provider.
694691 IAuthenticationResult result = miApp .acquireTokenForManagedIdentity (
695692 ManagedIdentityParameters .builder (resource )
@@ -709,7 +706,7 @@ void managedIdentity_ClaimsAndCapabilities(ManagedIdentitySourceType source, Str
709706 // Third call, when claims are passed bypass the cache.
710707 result = miApp .acquireTokenForManagedIdentity (
711708 ManagedIdentityParameters .builder (resource )
712- .claims (claimsJson )
709+ .claims (TestConfiguration . CLAIMS_REQUEST )
713710 .build ()).get ();
714711
715712 assertNotNull (result .accessToken ());
0 commit comments