@Test
public void uniquePerThread() throws Exception {

    final AtomicInteger threadIndex = new AtomicInteger();
    final Collator[] array = new Collator[NTHREADS];
    Thread[] threads = new Thread[NTHREADS];
    for (int i = 0; i < NTHREADS; i++) {
        threads[i] = new Thread(new Runnable() {
            public void run() {
                int index = threadIndex.getAndIncrement();
                AkCollatorICU icu = (AkCollatorICU) (AkCollatorFactory.getAkCollator("sv_se_ci"));
                array[index] = icu.collator.get();
            }
        });
    }
    for (int i = 0; i < NTHREADS; i++) {
        threads[i].start();
    }
    for (int i = 0; i < NTHREADS; i++) {
        threads[i].join();
    }
    for (int i = 0; i < NTHREADS; i++) {
        assertNotNull("Null", array[i]);
        for (int j = 0; j < i; j++) {
            assertTrue("Not unique", array[i] != array[j]);
        }
    }
}