示例:
@Test(expectedExceptions = Exception.class) // 警告:从未抛出预期的 ‘Exception' public void testEngineIsRunning() { assertTrue(engine.isRunning()); }