### Question:
ActivityManager extends AbstractMongoManager { public synchronized void setActivityExpRate(String serverId, float expRate, int expireSeconds) { if ( expRate >= 0f ) { Jedis jedisDB = JedisFactory.getJedisDB(); Map<String, String> map = new HashMap<String, String>(); map.put(FIELD_EXPRATE, String.valueOf(expRate)); if ( serverId != null ) { map.put(FIELD_SERVERID, serverId); } jedisDB.hmset(KEY_ACT_EXPRATE, map); if ( expireSeconds > 0 ) { jedisDB.expire(KEY_ACT_EXPRATE, expireSeconds); } } } private  ActivityManager(); void reload(); void sendPromotionMessages(User user); static final ActivityManager getInstance(); String getActivityUrl(); void displayActivityForUser(User user); void setActivityUrl(String url, int expireSeconds); synchronized float getActivityExpRate(User user); synchronized float getActivityStrengthRate(User user); synchronized void consumeDoubleExp(User user); synchronized void setActivityExpRate(String serverId, float expRate, int expireSeconds); synchronized void setActivityStrengthRate(String serverId, float strRate, int expireSeconds); synchronized void setActivityExpRate(User user, int battleCount, float expRate, int expireSeconds); static final String KEY_ACT_URL; static final String KEY_ACT_USER; static final String KEY_ACT_EXPRATE; static final String KEY_USER_EXPRATE; static final String KEY_ACT_STRRATE; static final String KEY_USER_STRRATE; static final String FIELD_BATTLECOUNT; static final String FIELD_STRCOUNT; static final String FIELD_EXPRATE; static final String FIELD_STRRATE; static final String FIELD_SERVERID; }### Answer:
@Test public void testSetActivityExpRate() throws Exception { float expRate = 2.0f; ActivityManager manager = ActivityManager.getInstance(); manager.setActivityExpRate(null, expRate, 1); assertEquals(2.0f, manager.getActivityExpRate(null), 0.01f); expRate = 3.0f; manager.setActivityExpRate(null, expRate, 60); assertEquals(3.0f, manager.getActivityExpRate(null), 0.01f); }