### Question:
AuthenticationToken { public Instant getIssuedAt() { return this.claims.getIssuedAt(); } AuthenticationToken(final ApnsSigningKey signingKey, final Instant issuedAt);  AuthenticationToken(final String base64EncodedToken); Instant getIssuedAt(); String getKeyId(); String getTeamId(); boolean verifySignature(final ApnsVerificationKey verificationKey); AsciiString getAuthorizationHeader(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj);  }### Answer:
@Test void testClaimsFromMap() { assertThrows(IllegalArgumentException.class, () -> AuthenticationToken.AuthenticationTokenClaims.fromMap( Collections.emptyMap())); assertThrows(IllegalArgumentException.class, () -> AuthenticationToken.AuthenticationTokenClaims.fromMap( Collections.singletonMap("iss", "team-id"))); assertThrows(IllegalArgumentException.class, () -> AuthenticationToken.AuthenticationTokenClaims.fromMap( Collections.singletonMap("iat", Instant.now().getEpochSecond()))); { final Map<String, Object> badIssuerMap = new HashMap<>(); badIssuerMap.put("iss", false); badIssuerMap.put("iat", Instant.now().getEpochSecond()); assertThrows(IllegalArgumentException.class, () -> AuthenticationToken.AuthenticationTokenClaims.fromMap( badIssuerMap)); } { final Map<String, Object> badTimestampMap = new HashMap<>(); badTimestampMap.put("iss", "team-id"); badTimestampMap.put("iat", "soon"); assertThrows(IllegalArgumentException.class, () -> AuthenticationToken.AuthenticationTokenClaims.fromMap( badTimestampMap)); } { final String teamId = "team-id"; final Instant timestamp = Instant.ofEpochSecond(Instant.now().getEpochSecond()); final Map<String, Object> claimsMap = new HashMap<>(); claimsMap.put("iss", teamId); claimsMap.put("iat", timestamp.getEpochSecond()); final AuthenticationToken.AuthenticationTokenClaims claims = AuthenticationToken.AuthenticationTokenClaims.fromMap(claimsMap); assertEquals(teamId, claims.getIssuer()); assertEquals(timestamp, claims.getIssuedAt()); } }
@Test void testGetIssuedAt() throws Exception { final Instant now = Instant.now(); final AuthenticationToken token = new AuthenticationToken(this.signingKey, now); assertEquals(token.getIssuedAt(), now); }