Tests for validates method