You may have a special test case that executes your verification code (and crash in case).
Maven Surefire ( ) Maven test (, process-test-classes): , Maven .
test , init.
:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<configuration>
<excludes>
<exclude>**/InitTest.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>test-init</id>
<phase>process-test-classes</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<test>InitTest</test>
</configuration>
</execution>
</executions>
</plugin>
, Surefire init. ( test) init ( <test>, priority include/exclude).
, :
, , , , ( default-test ), ( ), ( , ).
test, , pom.