@@ -232,39 +232,6 @@ void managedIdentityTest_UserAssigned_SuccessfulResponse(ManagedIdentitySourceTy
232
232
verify (httpClientMock , times (1 )).send (any ());
233
233
}
234
234
235
- @ Test
236
- void managedIdentityTest_TokenRevocation () throws Exception {
237
- IEnvironmentVariables environmentVariables = new EnvironmentVariablesHelper (ManagedIdentitySourceType .APP_SERVICE , appServiceEndpoint );
238
- ManagedIdentityApplication .setEnvironmentVariables (environmentVariables );
239
- DefaultHttpClient httpClientMock = mock (DefaultHttpClient .class );
240
-
241
- when (httpClientMock .send (expectedRequest (ManagedIdentitySourceType .APP_SERVICE , resource ))).thenReturn (expectedResponse (200 , getSuccessfulResponse (resource )));
242
-
243
- miApp = ManagedIdentityApplication
244
- .builder (ManagedIdentityId .systemAssigned ())
245
- .httpClient (httpClientMock )
246
- .build ();
247
-
248
- // Clear caching to avoid cross test pollution.
249
- miApp .tokenCache ().accessTokens .clear ();
250
-
251
- IAuthenticationResult result = miApp .acquireTokenForManagedIdentity (
252
- ManagedIdentityParameters .builder (resource )
253
- .build ()).get ();
254
-
255
- assertNotNull (result .accessToken ());
256
-
257
- // Simulate token revocation by clearing the cache
258
- miApp .tokenCache ().accessTokens .clear ();
259
-
260
- result = miApp .acquireTokenForManagedIdentity (
261
- ManagedIdentityParameters .builder (resource )
262
- .build ()).get ();
263
-
264
- assertNotNull (result .accessToken ());
265
- verify (httpClientMock , times (2 )).send (any ());
266
- }
267
-
268
235
@ Test
269
236
void managedIdentityTest_RefreshOnHalfOfExpiresOn () throws Exception {
270
237
//All managed identity flows use the same AcquireTokenByManagedIdentitySupplier where refreshOn is set,
0 commit comments