refactoring mocktangle.