fork mode in surefire plugin and also in intellij run confirguration properties should be set to class. if not in the same jvm the singletons do not work