public async Task SendPendingMessagesAsync(long nodeId)
        {
            try
            {
                var nodeConnection = _connectionsService.GetNodeConnection(nodeId);
                if (nodeConnection != null)
                {
                    var pendingMessages = await _pendingMessagesService.GetNodePendingMessagesAsync(nodeId).ConfigureAwait(false);

                    if (pendingMessages != null && pendingMessages.Any())
                    {
                        foreach (var message in pendingMessages)
                        {
                            await SendNoticeToNodeAsync(
                                nodeConnection,
                                ObjectSerializer.ByteArrayToObject <NodeNotice>(Convert.FromBase64String(message.Content))).ConfigureAwait(false);
                        }
                        await _pendingMessagesService.RemovePendingMessagesAsync(pendingMessages.Select(message => message.Id)).ConfigureAwait(false);
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.WriteLog(ex);
            }
        }
        public async Task GetNodePendingMessages()
        {
            var content = Guid.NewGuid();
            var expectedPendingMessage = await pendingMessagesService.AddNodePendingMessageAsync(2, content, TimeSpan.FromSeconds(10));

            var actualPendingMessages = await pendingMessagesService.GetNodePendingMessagesAsync(2);

            Assert.Contains(actualPendingMessages, message => message.Content == expectedPendingMessage.Content);
        }