BUG-4803: invalidate cache before each test
[yangtools.git] / common / util / src / test / java / org / opendaylight / yangtools / util / OffsetMapTest.java
index 4c4f6bbf18ebe7ae9f5bc418c0e90662884d290c..17a6f2e1edf8d308b76e258d2363e6cb90daadae 100644 (file)
@@ -29,6 +29,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.NoSuchElementException;
 import java.util.Set;
+import org.junit.Before;
 import org.junit.Test;
 
 public class OffsetMapTest {
@@ -39,6 +40,11 @@ public class OffsetMapTest {
         return (ImmutableOffsetMap<String, String>) ImmutableOffsetMap.copyOf(twoEntryMap);
     }
 
+    @Before
+    public void setup() {
+        OffsetMapCache.invalidateCache();
+    }
+
     @Test(expected=IllegalArgumentException.class)
     public void testWrongImmutableConstruction() {
         new ImmutableOffsetMap.Ordered<String, String>(Collections.<String, Integer>emptyMap(), new String[1]);