### Question:
JWTService { public String createToken(final String subject) { return getBuilder(subject).compact(); }  long getATokenExpirationTime(); long getRTokenExpirationTime(); String createToken(final String subject); String createToken(final String subject, final long expiresIn); String createToken(final String subject, final String authorities); String createRefreshToken(final String subject, final String authorities); String createToken(final String subject, final String authorities, final long expiresIn); Map<String, Object> getClaims(final String claimsJwt, final String... key); Map<String, Object> createLoginData(final String subject, final String accessToken, final Date issuedAt,
                                               final String authoritiesString, final String refreshToken); Map<String, Object> getClaimsExtended(final String claimsJwt, final String... key); static final String AUDIENCE; static final String EXPIRATION; static final String ID; static final String ISSUED_AT; static final String ISSUER; static final String NOT_BEFORE; static final String SUBJECT; static final long DEFAULT_ACCESS_TOKEN_EXPIRATION_TIME; static final long DEFAULT_REFRESH_TOKEN_EXPIRATION_TIME; }### Answer:
@Test public void createTwoTokensWithSubjectAreNotEqual() { final String sub = "TestSubjectBN"; final String token1 = jwtService.createToken(sub); final String token2 = jwtService.createToken(sub); assertNotEquals("The JWTService#createToken(String subject) method never should create two tokens " + "which are equals", token1, token2); }
@Test public void createTwoTokensWithSubjectAndExpAreNotEqual() { final String sub = "TestSubjectCV"; final long exp = 123; final String token1 = jwtService.createToken(sub, exp); final String token2 = jwtService.createToken(sub, exp); assertNotEquals("The JWTService#createToken(String subject, long expiresIn) method never should " + "create two tokens which are equals", token1, token2); }
@Test public void createTwoTokensWithSubjectAndAuthAreNotEqual() { final String sub = "TestSubjectRF"; final String auth = "ROLE_WS;ROLE_RF"; final String token1 = jwtService.createToken(sub, auth); final String token2 = jwtService.createToken(sub, auth); assertNotEquals("The JWTService#createToken(String subject, String authorities) method never should " + "create two tokens which are equals", token1, token2); }
@Test public void createTwoTokensWithSubjectAuthAndExpAreNotEqual() { final String sub = "TestSubjectBN"; final String auth = "ROLE_GT;ROLE_DE"; final long exp = 123; final String token1 = jwtService.createToken(sub, auth, exp); final String token2 = jwtService.createToken(sub, auth, exp); assertNotEquals("The JWTService#createToken(String subject, String authorities, long expiresIn) " + "method never should create two tokens which are equals", token1, token2); }