[expectations] add support for expectation classes