Bug 846845 - [MMS][SMS][Tests] add tests and simplify Utils. r=julien