public void Test_SetCategories() { var categories = new List <string>() { "test", "email" }; var mail = BasicMailBuilder .SetCategories(categories) .Build(); var message = new SendGridMessage(); message.SetCategories(categories); Assert.IsFalse(string.IsNullOrEmpty(message.Header.JsonString())); Assert.AreEqual(message.Header.JsonString(), mail.Header.JsonString()); }