@Test
public void testIsValidAccessToken() {

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