Refactored common code in test to create and insert m.a.r.