refactor Google test code