Added API for adding expectations.