01: package org.drools.util;
02:
03: import junit.framework.TestCase;
04:
05: import org.drools.util.ObjectHashMap.ObjectEntry;
06:
07: public class FactHashTableTest extends TestCase {
08: public void testEmptyIterator() {
09: final FactHashTable map = new FactHashTable();
10: final Iterator it = map.iterator();
11: for (ObjectEntry entry = (ObjectEntry) it.next(); entry != null; entry = (ObjectEntry) it
12: .next()) {
13: fail("Map is empty, there should be no iteration");
14: }
15: }
16: }
|