Refactor 'expected'