public TestNotifyingReaper(final String name) { super(name); }
public void test() {
NotifyingReaperMock.getExpiredObjects().clear();
Container container = new MapContainer();
for (int i = 0; i < 10; i++) {
container.put(new Integer(i), Integer.toString(i));
}
AbstractReaper reaper = new NotifyingReaperMock();
reaper.handleExpiredContainer(container);
assertEquals(10, container.size());
List expired = NotifyingReaperMock.getExpiredObjects();
assertEquals(10, expired.size());
for (int i = 0; i < 10; i++) {
assertTrue(expired.contains(Integer.toString(i)));