Use 'thrownBy' matcher instead of intercept