assertTrue(defaultCredential.refreshToken());
assertEquals(ACCESS_TOKEN, defaultCredential.getAccessToken());
}
public void testDefaultCredentialComputeErrorNotFound() throws IOException {
MockMetadataServerTransport transport = new MockMetadataServerTransport(ACCESS_TOKEN);
transport.setTokenRequestStatusCode(HttpStatusCodes.STATUS_CODE_NOT_FOUND);
TestDefaultCredentialProvider testProvider = new TestDefaultCredentialProvider();
Credential defaultCredential = testProvider.getDefaultCredential(transport, JSON_FACTORY);
assertNotNull(defaultCredential);