add a MockRepository object for futur unit test
remove duplication in tests
add tests for candidate schema
move mongoose tests apart