Mock that throw exceptions