[Tests] Refactor mocks and stubs