public async Task ValidateHandleAsync_TeamOwnerSucceed() { // Arrange this.memoryCache .Setup(x => x.CreateEntry(It.IsAny <string>())) .Returns(Mock.Of <ICacheEntry>); this.groupService .Setup(svc => svc.GetTeamOwnersAadObjectIdAsync(It.IsAny <string>())) .Returns(Task.FromResult(AuthenticationTestData.teamOwnersList)); this.authContext = FakeHttpContext.GetAuthorizationHandlerContextForTeamOwner(); // Act await this.policyHandler.HandleAsync(this.authContext); // Assert Assert.IsTrue(this.authContext.HasSucceeded); }