[test] Improve message filter