Added tests for append categories to messages