@@ -0,0 +1,2178 @@
+//  Copyright 2016 The Sawdust Open Source Project%0A//%0A// Licensed under the Apache License, Version 2.0 (the %22License%22);%0A// you may not use this file except in compliance with the License.%0A// You may obtain a copy of the License at%0A//%0A//     http://www.apache.org/licenses/LICENSE-2.0%0A//%0A// Unless required by applicable law or agreed to in writing, software%0A// distributed under the License is distributed on an %22AS IS%22 BASIS,%0A// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A// See the License for the specific language governing permissions and%0A// limitations under the License.%0A//%0A%0Apackage datastructure.queue;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.Parameterized;%0A%0Aimport java.util.Arrays;%0A%0A@RunWith(Parameterized.class)%0Apublic class FIFOQueueTest %7B%0A    @Parameterized.Parameters(name = %22%7Bindex%7D is FIFOQueue implementation %7B0%7D%22)%0A    public static Iterable%3CFIFOQueue%3E data() %7B%0A        return Arrays.asList(new FIFOQueue%5B%5D%7B%0A                new ArrayFIFOQueue%3C%3E(),%0A                new ArrayFIFOQueue2%3C%3E()%0A        %7D);%0A    %7D%0A%0A    private FIFOQueue%3CInteger%3E q;%0A%0A    public FIFOQueueTest(FIFOQueue%3CInteger%3E q) %7B%0A        this.q = q;%0A    %7D%0A%0A    @Test(timeout = 10L, expected = Test.None.class)%0A    public void test() %7B%0A        q.offer(5);%0A        q.offer(3);%0A        Assert.assertEquals(q.toString(), %22%5B5, 3%5D%22);%0A        Assert.assertEquals(q.size(), 2);%0A        Assert.assertEquals(q.poll(), 5, 0);%0A        Assert.assertEquals(q.isEmpty(), false);%0A        Assert.assertEquals(q.toString(), %22%5B3%5D%22);%0A        Assert.assertEquals(q.poll(), 3, 0);%0A        Assert.assertEquals(q.isEmpty(), true);%0A        Assert.assertEquals(q.poll(), null);%0A        q.offer(7);%0A        q.offer(9);%0A        Assert.assertEquals(q.toString(), %22%5B7, 9%5D%22);%0A        Assert.assertEquals(q.peek(), 7, 0);%0A        q.offer(4);%0A        Assert.assertEquals(q.size(), 3);%0A        Assert.assertEquals(q.poll(), 7, 0);%0A        q.offer(6);%0A        Assert.assertEquals(q.toString(), %22%5B9, 4, 6%5D%22);%0A        q.offer(8);%0A        Assert.assertEquals(q.poll(), 9, 0);%0A        Assert.assertEquals(q.toString(), %22%5B4, 6, 8%5D%22);%0A    %7D%0A%7D%0A

Add FIFOQueueTest