public void Initialize()
        {
            // Get elasticsearch configuration from external file.
            var config = new ConfigurationBuilder()
                         .AddJsonFile("elasticsearchsettings.json")
                         .Build();

            var elasticsearchTranscriptLoggerOptions = new ElasticsearchTranscriptLoggerOptions
            {
                ElasticsearchEndpoint = new Uri(config["Endpoint"]),
                UserName  = config["UserName"],
                Password  = config["Password"],
                IndexName = config["IndexName"]
            };

            elasticsearchEndpoint = config["Endpoint"];

            transcriptLogger = new ElasticsearchTranscriptLogger(elasticsearchTranscriptLoggerOptions);
        }
        public async Task TestCleanUp()
        {
            if (transcriptLogger != null)
            {
                // Get elasticsearch configuration from external file.
                var config = new ConfigurationBuilder()
                             .AddJsonFile("elasticsearchsettings.json")
                             .Build();

                var elasticsearchTranscriptLoggerOptions = new ElasticsearchTranscriptLoggerOptions
                {
                    ElasticsearchEndpoint = new Uri(config["Endpoint"]),
                    UserName  = config["UserName"],
                    Password  = config["Password"],
                    IndexName = config["IndexName"]
                };

                var connectionPool     = new SingleNodeConnectionPool(elasticsearchTranscriptLoggerOptions.ElasticsearchEndpoint);
                var connectionSettings = new ConnectionSettings(connectionPool, sourceSerializer: JsonNetSerializer.Default);

                if (!string.IsNullOrEmpty(elasticsearchTranscriptLoggerOptions.UserName) && !string.IsNullOrEmpty(elasticsearchTranscriptLoggerOptions.Password))
                {
                    connectionSettings = connectionSettings.BasicAuthentication(elasticsearchTranscriptLoggerOptions.UserName, elasticsearchTranscriptLoggerOptions.Password);
                }

                var client = new ElasticClient(connectionSettings);
                try
                {
                    await client.DeleteIndexAsync(Indices.Index(config["IndexName"] + "-" + DateTime.Now.ToString("MM-dd-yyyy")));
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.WriteLine("Error cleaning up resources: {0}", ex.ToString());
                }
            }
        }