Wrote MaterialPackageManager.rewrite_metadata_module() tests.