How to mock Google API AndroidPublisher request
问题 I've got a class that makes a request to the AndroidPublisher API to get the Purchases.Subscriptions.get resource. How does one mock out the OAuth request and call to get the subscription resource using the classes from the package com.google.api.client.testing? Here is the code to get the subscription: HttpTransport httpTransport = new NetHttpTransport.Builder().build(); JsonFactory jsonFactory = JacksonFactory.getDefaultInstance(); GoogleCredential credential = new GoogleCredential.Builder(