add test for core/message rewrite