test setModels for setting pre middleware