Browse souce code repository at: https://github.com/jjYBdx4IL/java-evaluation/blob/master/src/test/java/tests/java/util/concurrent/ConcurrentLinkedDequeTest.java
package tests.java.util.concurrent;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

import org.junit.Test;

import java.util.concurrent.ConcurrentLinkedDeque;

public class ConcurrentLinkedDequeTest {

    // can be used for efficient communication between threads without explicit
    // synchronization
    @Test
    public void test() {
        ConcurrentLinkedDeque<String> d = new ConcurrentLinkedDeque<>();
        assertNull(d.poll());
        d.offer("one");
        d.offer("two");
        assertEquals("one", d.peek());
        assertEquals("one", d.poll());
        assertEquals("two", d.peek());
        assertEquals("two", d.poll());
        assertNull(d.poll());
    }
}
-------------------------------------------------------------------------------
Test set: tests.java.util.concurrent.ConcurrentLinkedDequeTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in tests.java.util.concurrent.ConcurrentLinkedDequeTest
test  Time elapsed: 0 s