tests addsConstraint with JSON and VFL