added constraints into ParamDef
moved resttest