I could solve my problem by getting inspired of: https://github.com/arxes-tolina/sonar-plugins/blob/master/pom.xml
The problem was that Sonar did not had the needed libraries in its classpath at testing time.
In the above mentioned link, take a look at the maven-dependency-plugin section. There you need to include your needed artifacts-dependencies if your problem appears at testing time.
Hope it will help you.
Cheers
Emmanuel