Adding some tests and cleaning some code
Merge branch 'master' of github.com:Silverpeas/Silverpeas-Core into feature-4564