added $validator service unit tests