package ru.job4j.NonBlockingCacheTest;

import org.junit.Test;
import ru.job4j.NonBlockingCache.Base;
import ru.job4j.NonBlockingCache.NonBlockingCache;

/**
 * Created by Comp on 09.08.2018.
 */
public class NonBlockingCacheTest {
    NonBlockingCache nonBlockingCache;
    Base base;

    @Test
    public void iteratorTest() {
        nonBlockingCache.add(base);
        //assertNull(nonBlockingCache.get(base));
    }

    @Test
    public void iteratorTest3() {
        nonBlockingCache.add(base);
        nonBlockingCache.delete(base);


        //assertThat(simpleBlockingQueue, is("test name3"));
    }
}



@@ -33,16 +33,41 @@
 eTest;%0A%0A
+import org.junit.Assert;%0A
 import o
@@ -81,16 +81,16 @@
 t.Test;%0A
-
 import r
@@ -172,16 +172,109 @@
 Cache;%0A%0A
+import java.util.concurrent.atomic.AtomicReference;%0A%0Aimport static org.hamcrest.core.Is.is;%0A%0A
 /**%0A * C
@@ -443,92 +443,526 @@
 t() 
-%7B%0A        nonBlockingCache.add(base);%0A        //assertNull(nonBlockingCache.get(base
+throws InterruptedException %7B%0A        AtomicReference%3CException%3E ex = new AtomicReference%3C%3E();%0A        Thread thread = new Thread(%0A                () -%3E %7B%0A                    try %7B%0A                        throw new RuntimeException(%22Throw Exception in Thread%22);%0A                    %7D catch (Exception e) %7B%0A                        ex.set(e);%0A                    %7D%0A                %7D%0A        );%0A        thread.start();%0A        thread.join();%0A        Assert.assertThat(ex.get().getMessage(), is(%22Throw Exception in Thread%22
 ));%0A
@@ -968,16 +968,17 @@
 %0A    %7D%0A%0A
+%0A
     @Tes

Update : Обеспечить остановку потребителя.[#66833]