Few fixes in Model\Test and add tests