If the httpRequest is not successfull then the client-library tries to throw a TokenResponseException in com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(). But during the construction of that exception a NullPointerException is thrown.
java.lang.NullPointerException
com.google.api.client.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:127)
com.google.api.client.json.jackson2.JacksonFactory.createJsonParser(JacksonFactory.java:96)
com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:85)
com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:81)
com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:88)
com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:248)
com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:70)
com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:144)