### Question:
AccessToken implements Serializable { public String getRefreshExpiresIn() { return refreshExpiresIn; } AccessToken(String tokenType, String expiresIn, String scope, String refreshExpiresIn);  AccessToken(String tokenType, String expiresIn, String scope, boolean createRefreshToken, String refreshExpiresIn);  AccessToken(String tokenType, String expiresIn, String scope, String refreshToken, String refreshExpiresIn);  AccessToken(); String getToken(); void setToken(String accessToken); String getRefreshToken(); void setRefreshToken(String refreshToken); String getExpiresIn(); void setExpiresIn(String expiresIn); String getType(); void setType(String tokenType); String getScope(); void setScope(String scope); boolean isValid(); void setValid(boolean valid); String getClientId(); void setClientId(String clientId); String getCodeId(); void setCodeId(String codeId); String getUserId(); void setUserId(String userId); Map<String, String> getDetails(); void setDetails(Map<String, String> details); Map<String, String> getApplicationDetails(); void setApplicationDetails(Map<String, String> applicationDetails); Long getCreated(); void setCreated(Long created); String getRefreshExpiresIn(); void setRefreshExpiresIn(String refreshExpiresIn); static AccessToken loadFromMap(Map<String, Object> map); static AccessToken loadFromStringMap(Map<String, String> map); static AccessToken loadFromStringList(List<String> list); boolean tokenExpired(); boolean refreshTokenExpired();  }### Answer:
@Test public void when_refresh_expires_in_not_empty_with_predefined_refresh_token_true_use_that_value() throws Exception { AccessToken accessToken = new AccessToken("Bearer", "300", "basic", "refreshtoken", "1800"); assertTrue(accessToken.getRefreshExpiresIn() == "1800"); }
@Test public void when_client_credentials_token_do_not_add_refresh_expires_in() throws Exception { AccessToken accessToken = new AccessToken("Bearer", "1800", "scope", false, "600"); assertTrue(accessToken.getRefreshExpiresIn().isEmpty()); }
@Test public void when_password_token_add_refresh_expires_in() throws Exception { AccessToken accessToken = new AccessToken("Bearer", "300", "scope", true, "600"); assertTrue(accessToken.getRefreshExpiresIn().equals("600")); }