Add more tests and better params validations for ResourceController