Refactored to remove unnecessary setup

Refactored to remove unnecessary setup from the test case.