Mock with exceptions.