/**
  * Test that a new authorization token based off of an existing authorization token results its a
  * distinct, non-null refresh token.
  */
 @Test
 public void testGetRefreshTokenNewToken() {
   AuthorizationToken originalToken = new AuthorizationToken(VERIFICATION);
   AuthorizationToken newToken = new AuthorizationToken(originalToken);
   Assert.assertNotNull(newToken.getRefreshToken());
   Assert.assertNotEquals(originalToken.getRefreshToken(), newToken.getRefreshToken());
 }
 /**
  * Test that a new authorization token based off of an existing authorization token has an
  * expiration time sometime in the future.
  */
 @Test
 public void testGetExpirationInNewToken() {
   AuthorizationToken originalToken = new AuthorizationToken(VERIFICATION);
   AuthorizationToken newToken = new AuthorizationToken(originalToken);
   Assert.assertTrue(0L < newToken.getExpirationIn());
 }
 /**
  * Test that a new authorization token from an authorization code response has an expiration time
  * sometime in the future.
  */
 @Test
 public void testGetExpirationInBrandNewToken() {
   AuthorizationToken token = new AuthorizationToken(VERIFICATION);
   Assert.assertTrue(0L < token.getExpirationIn());
 }
 /**
  * Test that an authorization token that is being reconstructed from an existing authorization
  * token has a getter that returns the same refresh token with which it was built.
  */
 @Test
 public void testGetRefreshTokenOldToken() {
   AuthorizationToken token =
       new AuthorizationToken(CODE, ACCESS_TOKEN, REFRESH_TOKEN, CREATION_TIME, EXPIRATION_TIME);
   Assert.assertEquals(REFRESH_TOKEN, token.getRefreshToken());
 }
 /**
  * Test that a new authorization token built from an authorization code response returns a
  * non-null refresh token.
  */
 @Test
 public void testGetRefreshTokenBrandNewToken() {
   AuthorizationToken token = new AuthorizationToken(VERIFICATION);
   Assert.assertNotNull(token.getRefreshToken());
 }