BUG-7464: Update pom.xml
[yangtools.git] / third-party / triemap / src / test / java / org / opendaylight / yangtools / triemap / TestConcurrentMapPutIfAbsent.java
1 package org.opendaylight.yangtools.triemap;
2
3 import java.util.concurrent.ConcurrentMap;
4
5 import org.junit.Test;
6
7 public class TestConcurrentMapPutIfAbsent {
8     private static final int COUNT = 50*1000;
9
10     @Test
11     public void testConcurrentMapPutIfAbsent () {
12         final ConcurrentMap<Object, Object> map = new TrieMap<Object, Object> ();
13         
14         for (int i = 0; i < COUNT; i++) {
15             TestHelper.assertTrue (null == map.putIfAbsent (i, i));
16             TestHelper.assertTrue (Integer.valueOf (i).equals (map.putIfAbsent (i, i)));
17         }
18     }
19 }