add unique constraint in Page + complete tests