Adding unit tests for validation