test exception with @Rule