To fix that you will need change the configuration of maven-surefire-plugin on pom.xml from project to disable useSystemClassLoader.
Below you will find the excerpt of the file that should be changed.
<!-- Add the following configuration to maven-surefire-plugin on pom file of your project --> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-surefire-plugin</artifactId> | |
<configuration> | |
<useSystemClassLoader>false</useSystemClassLoader> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> |