public async Task CognitiveService_ProcessShouldInitializeAccessor() { var processor = Substitute.For <ICommandProcessor>(); _cache.TryGetValue(Constants.PluginsCacheKey, out Arg.Any <object>()).Returns(false); _commandProcessors.Add(processor); _storageService .GetAllPluginsAsync() .Returns( new Plugin[] { new Plugin { ProcessorTypeName = "CustomProcessor", Enabled = true, Groups = new [] { new PluginPropertyGroup { Name = "CustomGroup", UniqueName = "G1", Values = new [] { new [] { new PluginPropertyValue { Key = "P1", Value = "CustomGroupCustomValue" } } } } } } }); processor.Subject.Returns("Subj"); processor.Name.Returns("CustomProcessor"); var result = await _service.GetCognitiveTextAnalysisResultAsync( new TextDeconstructionInformation("Test", "Subj"), "*****@*****.**"); var group = result.PropertiesAccessor.GetPluginPropertyGroup("G1"); Assert.AreEqual(1, group.Count); Assert.AreEqual("CustomGroupCustomValue", group[0][0].Value); Assert.AreEqual(processor, result.CommandProcessor); }