ESTestCase 2.x + Jacoco not working

I've read the Testing Framework Cheatsheet and tried to execute Jacoco coverage over my unit tests as instructed:
mvn -Dtests.coverage test jacoco:report
But it doesn't work. Maven fails, debugging it I found the exception:
java.lang.RuntimeException: unable to install test security manager Caused by: java.lang.NullPointerException
Removing the jacoco report goal results the same:
mvn -Dtests.coverage test
What is missing in my project? Which configurations in Elasticsearch master pom should I use in my project to fix it?

Found the problem. The property tests.coverage.dir must be set. I did it in my project POM.

Like so:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<tests.coverage.dir>${project.build.directory}</tests.coverage.dir>
</systemPropertyVariables>
</configuration>
</plugin>