Add self-tests for 'Expectation' mechanism.