public async Task AuthenticateWithCliCredential_ExpiresIn() { var(expectedToken, expectedExpiresOn, processOutput) = CredentialTestHelpers.CreateTokenForAzureCliExpiresIn(1800); var testProcess = new TestProcess { Output = processOutput }; AzureCliCredential credential = InstrumentClient(new AzureCliCredential(CredentialPipeline.GetInstance(null), new TestProcessService(testProcess))); AccessToken actualToken = await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default)); Assert.AreEqual(expectedToken, actualToken.Token); Assert.LessOrEqual(expectedExpiresOn, actualToken.ExpiresOn); }