refactoring for mockInterfaces