### Question:
IdToken { public static Boolean refreshToken(IdToken token) { if(token == null) return true; long diff = token.expirationTimeMillis - System.currentTimeMillis(); long diffMinutes = diff / (60 * 1000) % 60; return diffMinutes <= 2; }  static Boolean refreshToken(IdToken token);  }### Answer:
@Test public void should_returnTrue_givenNull_refreshTokenTest() { Assert.assertTrue(IdToken.refreshToken(null)); }
@Test public void should_returnTrue_givenValidToken_refreshTokenTest() { IdToken idToken = IdToken.builder().tokenValue("tokenValue").expirationTimeMillis(System.currentTimeMillis()).build(); Assert.assertTrue(IdToken.refreshToken(idToken)); }
@Test public void should_returnFalse_whenTokenExpired_refreshTokenTest() { IdToken idToken = IdToken.builder().tokenValue("tokenValue").expirationTimeMillis(System.currentTimeMillis()).build(); idToken.setExpirationTimeMillis(System.currentTimeMillis()+1000000L); idToken = IdToken.builder().tokenValue("tokenValue").expirationTimeMillis(System.currentTimeMillis()+1000000L).build(); Assert.assertFalse(IdToken.refreshToken(idToken)); }