test case refactoring -  mocked function deleted