Tweak mock so that mid can be dynamic