Added validation for mandatory fields at parse method.
Added several tests for parse method.