Add test coverage for Mname.

Reviewed at https://reviews.apache.org/r/24042/