diff --git a/src/test/java/teetime/framework/exceptionHandling/ExceptionHandlingTest.java b/src/test/java/teetime/framework/exceptionHandling/ExceptionHandlingTest.java index 5fb16e84997320f656e981a21d2d2eec4bfc4f39..1d0d5c6e89749843d64ea773d505a81800d1eedd 100644 --- a/src/test/java/teetime/framework/exceptionHandling/ExceptionHandlingTest.java +++ b/src/test/java/teetime/framework/exceptionHandling/ExceptionHandlingTest.java @@ -15,8 +15,6 @@ */ package teetime.framework.exceptionHandling; -import static org.junit.Assert.assertTrue; - import org.junit.Test; import teetime.framework.Execution; @@ -24,16 +22,9 @@ import teetime.framework.ExecutionException; public class ExceptionHandlingTest { - @Test + @Test(expected = ExecutionException.class) public void testException() { - boolean exceptionArised = false; - ExceptionPassingTestConfig exceptionPassingTestConfig = new ExceptionPassingTestConfig(); - try { - new Execution<ExceptionPassingTestConfig>(exceptionPassingTestConfig).executeBlocking(); - } catch (ExecutionException e) { - exceptionArised = true; - } - assertTrue(exceptionArised); + new Execution<ExceptionPassingTestConfig>(new ExceptionPassingTestConfig()).executeBlocking(); } }