Since this test uses just "Assert.fail();" without any message - it is equivalent to add "@Test(expected = CheckstyleException.class )" to the annotation. - It seems to me the really rare case when it does make sense.