Refactored structure of the unit test