Small refactoring of GoogleApiMock class