public void shouldGetExpirationTime() throws Exception {
Date expectedDate = new Date(1477592 * 1000);
Clock clock = mock(Clock.class);
when(clock.getToday()).thenReturn(expectedDate);
String token = "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0Nzc1OTJ9.x_ZjkPkKYUV5tdvc0l8go6D_z2kez1MQcOxokXrDc3k";
<BUG>DecodedJWT jwt = JWT.require(Algorithm.HMAC256("secret"))
.build(clock)</BUG>
.verify(token);
assertThat(jwt, is(notNullValue()));
assertThat(jwt.getExpiresAt(), is(instanceOf(Date.class)));

public void shouldGetExpirationTime() throws Exception {
Date expectedDate = new Date(1477592 * 1000);
Clock clock = mock(Clock.class);
when(clock.getToday()).thenReturn(expectedDate);
String token = "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0Nzc1OTJ9.x_ZjkPkKYUV5tdvc0l8go6D_z2kez1MQcOxokXrDc3k";
JWTVerifier.BaseVerification verification = (JWTVerifier.BaseVerification) JWT.require(Algorithm.HMAC256("secret"));
DecodedJWT jwt = verification
.build(clock)
.verify(token);
assertThat(jwt, is(notNullValue()));
assertThat(jwt.getExpiresAt(), is(instanceOf(Date.class)));
