refactor ExpectationTest