Currently some testsuite cases do fail with an error instead of a failure in Maven surefire terms. In JUnit tests the BeforeClass and AfterClass are called independet. One has to check preconditions in both, it's not correct to rely on state of BeforeClass in AfterClass. In any case a unit tests with a known assumption should fail with a failure at the earliest point.
UseCase where this came up:
I was trying to identify the issue where the LoggingSubSystem Configuration error was not showing up in the Stacktraces of the tests. For example this NPE was a follow up, but should have shown up earlier:
Solution: In most cases it was possible to have Asserts (@Before) or tearDown(@After) methods. Sometimes it requires checking for a started server.
The behaviour to break shall be kept. If it's a NPE at the moment, there shall be not a if(x != null) statement but an Assert.assertNotNull.