public async Task RunCommandAsyncJavaScriptCommand()
        {
            //Arrange 
            var dbConnection = new UnitTestDbConnection();
            Database.SetInitializer(new CreateFreshDbInitializer());

            var adapterManager = new StubIAdapterManager
            {
                FindZvsAdapterGuid = adapterGuid => new StubZvsAdapter
                {
                    IsEnabled = true,
                    ProcessDeviceTypeCommandAsyncDeviceTypeDeviceDeviceTypeCommandString = (adapterDevice, command, argument, argument2) => Task.FromResult(0)
                }
            };
            var logEntries = new List<LogEntry>();
            var log = new StubIFeedback<LogEntry>
            {
                ReportAsyncT0CancellationToken = (e, c) =>
                {
                    Console.WriteLine(e);
                    logEntries.Add(e);
                    return Task.FromResult(0);
                }
            };

            var cts = new CancellationTokenSource();
            var commmandProcessor = new CommandProcessor(adapterManager, dbConnection, log);

            using (var context = new ZvsContext(dbConnection))
            {
                var jsCommand = new JavaScriptCommand()
                {
                    Script = "logInfo('test');"
                };
                context.Commands.Add(jsCommand);
                await context.SaveChangesAsync(new CancellationToken());

                //Act
                var result = await commmandProcessor.RunCommandAsync(jsCommand.Id, "1", "", cts.Token);
                Console.WriteLine(result.Message);

                //Assert
                Assert.IsFalse(result.HasError, result.Message);
                Assert.IsTrue(logEntries.Any(o=> o.Message == "test"));
            }
        }
 internal async Task<Result> ExecuteJavaScriptCommandAsync(JavaScriptCommand command, string argument, string argument2, CancellationToken cancellationToken)
 {
     var javaScriptRunner = new JavaScriptRunner(Log, this, EntityContextConnection);
     return await javaScriptRunner.ExecuteScriptAsync(command.Script, cancellationToken);
 }