Add test for messages extraction