Added validation and exception tests