add this to your test method:
@Test(expected=DataException.class)
or use this :
then(caughtException()).isInstanceOf(DataException.class);
for a static-block there is no way other than try-catch.
Another way is to change DataException
to a RuntimeException
.