@Test
public void testIsValidRefreshToken() {

	long issuedAtNow = System.currentTimeMillis() / 1000;
	Assert.assertTrue(
		_defaultBearerTokenProvider.isValid(
			generateRefreshToken(_REFRESH_TOKEN_EXPIRES_IN, issuedAtNow)));
	Assert.assertFalse(
		_defaultBearerTokenProvider.isValid(
			generateRefreshToken(-1, issuedAtNow)));
	Assert.assertFalse(
		_defaultBearerTokenProvider.isValid(
			generateRefreshToken(
				_REFRESH_TOKEN_EXPIRES_IN,
				issuedAtNow - (_REFRESH_TOKEN_EXPIRES_IN + 1))));
	Assert.assertFalse(
		_defaultBearerTokenProvider.isValid(
			generateRefreshToken(
				_REFRESH_TOKEN_EXPIRES_IN,
				issuedAtNow + _REFRESH_TOKEN_EXPIRES_IN)));
}