Assert.assertFalse(StringUtils.isEmpty(token.getAccessToken()), "Null access token string from API");
Assert.assertFalse(StringUtils.isEmpty(token.getRefreshToken()), "Null refresh token string from API");
Assert.assertTrue(token.getCreatedAt().isBeforeNow(), "Token creation time was not in the past.");
Assert.assertTrue(token.getExpiresAt().isAfterNow(), "Token creation time was not in the past.");
token.exportCache(Settings.AUTH_CACHE_FILE);
Assert.assertTrue(Settings.AUTH_CACHE_FILE.exists(), "Cache file does not exist.");
JsonNode json = JsonUtil.getJsonMapper().readTree(Settings.AUTH_CACHE_FILE);
Assert.assertEquals(json.get("access_token").asText(), token.getAccessToken(),
"Access token saved does not match that returned from the API");