SONARJAVA-324 Improve tests