public async Task GetByUuidAndTypeAsync01(KeyType keyType) { _keyRepositoryMock.Setup(kr => kr.FindOrCreateAsync(_testGuid, keyType, It.IsAny <CancellationToken>())) .ReturnsAsync(new Key()); await _keyProvider.GetByUuidAndTypeAsync(_testGuid, keyType, new CancellationToken()); _keyRepositoryMock.Verify( kr => kr.FindOrCreateAsync(_testGuid, keyType, It.IsAny <CancellationToken>()), Times.Once); }