Mocking tools and techniques would highly depend on your development stack.
Generally speaking, you would need to inject the service as a dependency - so, in the production code, you would inject the real Google Service and on test code you would inject a mock.
class GoogleAbstractService
class GoogleService extends GoogleAbstractService // Real service
class GoogleMockService extends GoogleAbstractService // Mocked service
class AnyClientOfTheService
constructor(GoogleAbstractService googleService ){
this.googleService = googleService ;
}
new AnyClientOfTheService(new GoogleService()); //production code
new AnyClientOfTheService(new GoogleMockService()); //test code
GoogleService would call the real service, whereas GoogleMockService would promptly return some value (of the same type), but never reaching the network.