tests : refactoring + user unit test