public async Task Build_ShouldCallDistributedCache_When_CacheEnabled() { // Arrange _mockSchemaProvider .Setup(_ => _.ValidateSchemaName(It.IsAny <string>())) .ReturnsAsync(true); // Act await _schemaFactory.Build("form"); // Assert _mockDistributedCache.Verify(_ => _.GetString(It.IsAny <string>()), Times.Once); }