<Can WireMock stub request that is not made to `lo...
# stackoverflow
r
Can WireMock stub request that is not made to `localhost`? I send email with use of com.google.api.services.gmail.Gmail: Message message = gmail.users().messages().send("me", msg).execute(); When this method is called in my tests it triggers token refresh(token that I set in gmail credentials is outdated) So it makes POST https://oauth2.googleapis.com/token I want to stub response to https://oauth2.googleapis.com/token with WireMock But because it happens inside execute() I cannot override URL that it used to replace oauth2.googleapis.com with...