Jwt { public Instant getIssuedAt() { return getInstant(JwtNames.CLAIM_ISSUED_AT); } Jwt(JSONObject header, JSONObject payload, Clock clock, Duration clockSkew); String getIssuer(); String getSubject(); List<String> getAudiences(); String getJwtId(); Instant getExpiration(); Instant getNotBefore(); Instant getIssuedAt(); Object getClaim(String name); String getType(); String getContentType(); String getAlgorithm(); String getKeyId();  }
@Test public void getIssuedAt_success() throws Exception { JSONObject payload = new JSONObject(); Instant instant = Instant.now(); payload.put(JwtNames.CLAIM_ISSUED_AT, instant.getEpochSecond()); Jwt token = new Jwt(new JSONObject(), payload, Clock.systemUTC(), Duration.ZERO); assertThat(token.getIssuedAt().getEpochSecond()).isEqualTo(instant.getEpochSecond()); }