Add specs for regression on the expectation factory issue