Jwt implements AccessToken { @Override public String getIdentity() { return bodyContent.getIdentity(); } Jwt(JwtHeaderContent headerContent, JwtBodyContent bodyContent);  Jwt(JwtHeaderContent headerContent, JwtBodyContent bodyContent, byte[] signatureData);  Jwt(String jwtToken); @Override boolean equals(Object obj); JwtBodyContent getBodyContent(); JwtHeaderContent getHeaderContent(); @Override String getIdentity(); byte[] getSignatureData(); @Override int hashCode(); boolean isExpired(); boolean isExpired(Date lifeTimePredefined); @Override String stringRepresentation();  }
@Test public void generate_byIdentity() throws CryptoException { JwtGenerator generator = fake.getJwtGenerator(); Jwt jwt = generator.generateToken(this.identity); assertNotNull(jwt); assertEquals(this.identity, jwt.getIdentity()); }