some work on tests

* refactoring Validation test that make our tests fail on MacOS. @loicfrering can you check if this is fixed ?
* add some basic mocked tests for `CrudService`, `RepositoryBasedRestController`, `ServiceBasedRestController`, `JpaexceptionHandler`, `ResthubExceptionHandler` and `ValidationController`
* some light refactoring on tests or related to tests