Refactor definition schemas tests