void () { int limit = StatisticsManager.RECENCY_OBLIVION_THRESHOLD; StatisticsManager m = StatisticsManager.getInstance(); for (int i = limit + 1; i >= 0; i--) { m.incUseCount(new StatisticsInfo("context", "value" + i)); } for (int i = 0; i < limit; i++) { assertEquals(i, m.getLastUseRecency(new StatisticsInfo("context", "value" + i))); } assertEquals(Integer.MAX_VALUE, m.getLastUseRecency(new StatisticsInfo("context", "value" + limit))); assertEquals(Integer.MAX_VALUE, m.getLastUseRecency(new StatisticsInfo("anotherContext", "value0"))); }