return function()local E=(game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")).Packages.Monolith local p=require(E.LinkedQueue)describe("\067\111\110\115\116\114\117\099\116\111\114",function()it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097\110 \101\109\112\116\121 \076\105\110\107\101\100\081\117\101\117\101",function()local E=p.new();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \076\105\110\107\101\100\081\117\101\117\101 \102\114\111\109 \097 \116\097\098\108\101",function()local E={1,2;3,4;5}local R=p.new(E);(expect(R:Count())).to.equal(#E)local g=1 while R:Count()>0 do local p=R:Shift();(expect(p)).to.equal(E[g])g=g+1 end end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \076\105\110\107\101\100\081\117\101\117\101 \102\114\111\109 \097 \067\111\108\108\101\099\116\105\111\110",function()local E=p.new({1;2;3;4,5})local R=p.new(E);(expect(R:Count())).to.equal(E:Count())while R:Count()>0 do local p=R:Shift()local g=E:Shift();(expect(p)).to.equal(g)end end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \099\114\101\097\116\101 \097 \076\105\110\107\101\100\081\117\101\117\101 \102\114\111\109 \097 \110\111\110-\116\097\098\108\101",function()(expect(function()p.new(true)end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\081\117\101\117\101 \102\114\111\109 \116\121\112\101 \098\111\111\108\101\097\110\046");(expect(function()p.new(1)end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\081\117\101\117\101 \102\114\111\109 \116\121\112\101 \110\117\109\098\101\114\046");(expect(function()p.new("\115\116\114\105\110\103")end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\081\117\101\117\101 \102\114\111\109 \116\121\112\101 \115\116\114\105\110\103\046");(expect(function()p.new(function() end)end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\081\117\101\117\101 \102\114\111\109 \116\121\112\101 \102\117\110\099\116\105\111\110\046");(expect(function()p.new(Instance.new("\070\111\108\100\101\114"))end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\081\117\101\117\101 \102\114\111\109 \116\121\112\101 \117\115\101\114\100\097\116\097\046");(expect(function()p.new(coroutine.create(function() end))end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\081\117\101\117\101 \102\114\111\109 \116\121\112\101 \116\104\114\101\097\100\046")end)end)describe("\069\110\117\109\101\114\097\098\108\101 \073\110\116\101\114\102\097\099\101",function()describe("\069\110\117\109\101\114\097\116\111\114",function()it("\115\104\111\117\108\100 \112\114\111\118\105\100\101 \097\110 \105\116\101\114\097\116\111\114 \103\101\110\101\114\097\116\111\114",function()local E=p.new()local R=E:Enumerator();(expect(R)).to.be.a("\102\117\110\099\116\105\111\110")end)it("\115\104\111\117\108\100 \101\110\117\109\101\114\097\116\101 \105\110 \097 \103\101\110\101\114\105\099 \102\111\114 \108\111\111\112",function()local E=p.new()local R=10 for p=1,R,1 do E:Add(p)end local g=0 for E,p in E:Enumerator()do g=g+1;(expect(E)).to.be.a("\110\117\109\098\101\114");(expect(p)).to.be.a("\110\117\109\098\101\114")end;(expect(g)).to.equal(R)end)end)end)describe("\067\111\108\108\101\099\116\105\111\110 \073\110\116\101\114\102\097\099\101",function()describe("\082\101\113\117\105\114\101\100 \077\101\116\104\111\100\115",function()describe("\067\111\110\116\097\105\110\115",function()it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110\121 \101\108\101\109\101\110\116 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(E:Contains(0))).to.equal(false)end)it("\115\104\111\117\108\100 \102\105\110\100 \097\110 \101\108\101\109\101\110\116 \119\104\101\110 \116\104\097\116 \101\108\101\109\101\110\116 \101\120\105\115\116\115",function()local E=p.new({1;2,3;4;5});(expect(E:Contains(1))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110 \101\108\101\109\101\110\116 \119\104\101\110 \116\104\097\116 \101\108\101\109\101\110\116 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1;2,3,4;5});(expect(E:Contains(0))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110 \101\108\101\109\101\110\116 \117\110\116\105\108 \105\116 \105\115 \097\100\100\101\100",function()local E=p.new({1,2;3,4;5});(expect(E:Contains(0))).to.equal(false)E:Add(0);(expect(E:Contains(0))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111 \108\111\110\103\101\114 \102\105\110\100 \097\110 \101\108\101\109\101\110\116 \119\104\101\110 \105\116\115 \114\101\109\111\118\101\100",function()local E=p.new({1,2,3;4,5});(expect(E:Contains(1))).to.equal(true)E:Remove(1);(expect(E:Contains(1))).to.equal(false)end)end)describe("\067\111\110\116\097\105\110\115\065\108\108",function()it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110\121 \101\108\101\109\101\110\116 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2,3,4,5});(expect(E:ContainsAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \102\105\110\100 \097\108\108 \122\101\114\111 \101\108\101\109\101\110\116\115 \119\104\101\110 \116\104\101 \112\114\111\118\105\100\101\100 \067\111\108\108\101\099\116\105\111\110 \105\115 \101\109\112\116\121",function()local E=p.new({1;2,3,4;5})local R=p.new();(expect(E:ContainsAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \097\108\108 \111\102 \116\104\101 \101\108\101\109\101\110\116\115 \101\120\105\115\116",function()local E=p.new({1;2,3,4,5})local R=p.new({1;2,3;4;5});(expect(E:ContainsAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \102\105\110\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \105\116 \101\120\105\115\116\115",function()local E=p.new({1;2,3;4,5})local R=p.new({3});(expect(E:ContainsAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \111\110\101 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1,2,4;5})local R=p.new({1,2;3;4;5});(expect(E:ContainsAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \105\116 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1,2,4;5})local R=p.new({3});(expect(E:ContainsAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \117\110\116\105\108 \116\104\101\121 \097\114\101 \097\100\100\101\100",function()local E=p.new()local R=p.new({1,2});(expect(E:ContainsAll(R))).to.equal(false)E:Add(1);(expect(E:ContainsAll(R))).to.equal(false)E:Add(2);(expect(E:ContainsAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111 \108\111\110\103\101\114 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \116\104\101\121 \097\114\101 \114\101\109\111\118\101\100",function()local E=p.new({1,2,3,4,5})local R=p.new({1,2,3;4,5});(expect(E:ContainsAll(R))).to.equal(true)E:Remove(1);(expect(E:ContainsAll(R))).to.equal(false)end)end)describe("\067\111\110\116\097\105\110\115\065\110\121",function()it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110\121 \101\108\101\109\101\110\116 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2;3;4,5});(expect(E:ContainsAny(R))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110\121 \101\108\101\109\101\110\116 \119\104\101\110 \116\104\101 \112\114\111\118\105\100\101\100 \067\111\108\108\101\099\116\105\111\110 \105\115 \101\109\112\116\121",function()local E=p.new({1,2,3,4;5})local R=p.new();(expect(E:ContainsAny(R))).to.equal(false)end)it("\115\104\111\117\108\100 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \116\104\101 \101\108\101\109\101\110\116\115 \101\120\105\115\116",function()local E=p.new({1;2,3,4;5})local R=p.new({1;2;3;4;5});(expect(E:ContainsAny(R))).to.equal(true)end)it("\115\104\111\117\108\100 \102\105\110\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \105\116 \101\120\105\115\116\115",function()local E=p.new({1,2;3,4,5})local R=p.new({3});(expect(E:ContainsAny(R))).to.equal(true)end)it("\115\104\111\117\108\100 \102\105\110\100 \115\111\109\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \111\110\108\121 \111\110\101 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1;2,4,5})local R=p.new({1,2,3;4,5});(expect(E:ContainsAny(R))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \105\116 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1,2,4;5})local R=p.new({3});(expect(E:ContainsAny(R))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \101\108\101\109\101\110\116\115 \117\110\116\105\108 \116\104\101\121 \097\114\101 \097\100\100\101\100",function()local E=p.new()local R=p.new({1;2});(expect(E:ContainsAny(R))).to.equal(false)E:Add(1);(expect(E:ContainsAny(R))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111 \108\111\110\103\101\114 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \116\104\101\121 \097\114\101 \097\108\108 \114\101\109\111\118\101\100",function()local E=p.new({1;2;3,4;5})local R=p.new({1;2,3;4,5});(expect(E:ContainsAny(R))).to.equal(true)E:Remove(1);(expect(E:ContainsAny(R))).to.equal(true)E:Clear();(expect(E:ContainsAny(R))).to.equal(false)end)end)describe("\067\111\117\110\116",function()it("\115\104\111\117\108\100 \099\111\117\110\116 \122\101\114\111 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \099\111\117\110\116 \116\104\101 \110\117\109\098\101\114 \111\102 \101\108\101\109\101\110\116\115 \105\110 \116\104\101 \076\105\110\107\101\100\081\117\101\117\101",function()local E=p.new({1;2;3,4;5});(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \099\111\117\110\116 \110\101\119 \101\108\101\109\101\110\116\115 \119\104\101\110 \116\104\101\121 \097\114\101 \097\100\100\101\100",function()local E=p.new()local R=10;(expect(E:Count())).to.equal(0)for p=1,R,1 do E:Add(p);(expect(E:Count())).to.equal(p)end;(expect(E:Count())).to.equal(R)end)it("\115\104\111\117\108\100 \110\111\116 \099\111\117\110\116 \101\108\101\109\101\110\116\115 \097\102\116\101\114 \116\104\101\121 \097\114\101 \114\101\109\111\118\101\100",function()local E=p.new({1;2;3;4;5})local R=E:Count();(expect(R)).to.equal(5)while R>0 do E:Shift()local p=R R=E:Count();(expect(R)).to.equal(p-1)end end)it("\115\104\111\117\108\100 \099\111\117\110\116 \122\101\114\111 \097\102\116\101\114 \098\101\105\110\103 \099\108\101\097\114\101\100",function()local E=p.new({1;2,3;4,5});(expect(E:Count())).to.equal(5)E:Clear();(expect(E:Count())).to.equal(0)end)end)describe("\069\109\112\116\121",function()it("\115\104\111\117\108\100 \098\101 \101\109\112\116\121 \119\104\101\110 \105\110\115\116\097\110\116\105\097\116\101\100",function()local E=p.new();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \098\101 \101\109\112\116\121 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:Empty())).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \098\101 \101\109\112\116\121 \119\105\116\104 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3,4;5});(expect(E:Empty())).to.equal(false)end)it("\115\104\111\117\108\100 \110\111 \108\111\110\103\101\114 \098\101 \101\109\112\116\121 \097\102\116\101\114 \097\110 \101\108\101\109\101\110\116 \105\115 \097\100\100\101\100",function()local E=p.new();(expect(E:Empty())).to.equal(true)E:Add(1);(expect(E:Empty())).to.equal(false)end)it("\115\104\111\117\108\100 \098\101 \101\109\112\116\121 \097\102\116\101\114 \097\108\108 \101\108\101\109\101\110\116\115 \097\114\101 \114\101\109\111\118\101\100",function()local E=p.new({1,2;3,4;5})while E:Count()>0 do(expect(E:Empty())).to.equal(false)E:Shift()end;(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \098\101 \101\109\112\116\121 \097\102\116\101\114 \098\101\105\110\103 \099\108\101\097\114\101\100",function()local E=p.new({1,2,3,4;5});(expect(E:Empty())).to.equal(false)E:Clear();(expect(E:Empty())).to.equal(true)end)end)describe("\084\111\065\114\114\097\121",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \116\097\098\108\101",function()local E=p.new();(expect(E:ToArray())).to.be.a("\116\097\098\108\101")end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \116\097\098\108\101 \111\102 \116\104\101 \115\097\109\101 \115\105\122\101",function()local E=p.new({1;2,3,4,5});(expect(#E:ToArray())).to.equal(E:Count())end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097\110 \101\109\112\116\121 \116\097\098\108\101 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(#E:ToArray())).to.equal(0)end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \116\097\098\108\101 \119\105\116\104 \116\104\101 \115\097\109\101 \101\108\101\109\101\110\116\115 \097\110\100 \111\114\100\101\114 \111\102 \101\110\117\109\101\114\097\116\105\111\110",function()local E=p.new({1;2;3,4,5})local R=E:ToArray();(expect(#R)).to.equal(E:Count())for p,R in ipairs(R)do(expect(R)).to.equal(E:Shift())end end)it("\115\104\111\117\108\100 \112\114\111\118\105\100\101 \111\110\108\121 \097\114\114\097\121 \105\110\100\101\120\097\098\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3;4;5})local R=E:ToArray()local g=0 for E in pairs(R)do g=g+1 end;(expect(g)).to.equal(#R)end)end)describe("\084\111\084\097\098\108\101",function()it("\115\104\111\117\108\100 \112\114\111\118\105\100\101 \116\104\101 \115\097\109\101 \114\101\112\114\101\115\101\110\116\097\116\105\111\110 \097\115 \084\111\065\114\114\097\121",function()local E=p.new({1;2;3,4,5})local R=E:ToArray()local g=E:ToTable();(expect(g)).to.be.a("\116\097\098\108\101");(expect(#g)).to.equal(#R)for E,p in pairs(g)do(expect(p)).to.equal(R[E])end end)end)end)describe("\079\112\116\105\111\110\097\108 \077\101\116\104\111\100\115",function()describe("\065\100\100",function()it("\115\104\111\117\108\100 \097\100\100 \101\108\101\109\101\110\116\115 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()E:Add(1);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \097\100\100 \101\108\101\109\101\110\116\115 \119\104\101\110 \110\111\116 \101\109\112\116\121",function()local E=p.new({1,2,3,4,5})E:Add(6);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \097\100\100 \101\108\101\109\101\110\116\115 \116\111 \116\104\101 \101\110\100",function()local E=p.new({1;2;3;4,5})E:Add(1)while E:Count()>1 do E:Shift()end;(expect(E:First())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101",function()local E=p.new();(expect(E:Add(1))).to.equal(true)end)it("\115\104\111\117\108\100 \097\100\100 \100\117\112\108\105\099\097\116\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1;1;1;1;1})E:Add(1);(expect(E:Count())).to.equal(6)end)end)describe("\065\100\100\065\108\108",function()it("\115\104\111\117\108\100 \097\100\100 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2,3;4;5})E:AddAll(R);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \097\100\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1})E:AddAll(R);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \097\100\100 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \110\111\116 \101\109\112\116\121",function()local E=p.new({1,2,3,4,5})local R=p.new({6,7,8;9,0})E:AddAll(R);(expect(E:Count())).to.equal(10)end)it("\115\104\111\117\108\100 \097\100\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \110\111\116 \101\109\112\116\121",function()local E=p.new({1,2;3,4;5})local R=p.new({6})E:AddAll(R);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \097\100\100 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \116\111 \116\104\101 \101\110\100",function()local E=p.new({1,2;3,4;5})local R=p.new({6;7,8,9;10})E:AddAll(R)while E:Count()>R:Count()do E:Shift()end;(expect(E:Shift())).to.equal(6);(expect(E:Shift())).to.equal(7);(expect(E:Shift())).to.equal(8);(expect(E:Shift())).to.equal(9);(expect(E:Shift())).to.equal(10)end)it("\115\104\111\117\108\100 \097\100\100 \111\110\101 \101\108\101\109\101\110\116 \116\111 \116\104\101 \101\110\100",function()local E=p.new({1,2;3,4,5})local R=p.new({6})E:AddAll(R)while E:Count()>1 do E:Shift()end;(expect(E:First())).to.equal(6)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \097\100\100\105\110\103 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new()local R=p.new({6;7;8;9;10});(expect(E:AddAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \097\100\100\105\110\103 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new()local R=p.new({6});(expect(E:AddAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \097\100\100 \109\117\108\116\105\112\108\101 \100\117\112\108\105\099\097\116\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1;1,1,1;1})local R=p.new({1;1,1,1;1})E:AddAll(R);(expect(E:Count())).to.equal(10)end)it("\115\104\111\117\108\100 \097\100\100 \111\110\101 \100\117\112\108\105\099\097\116\101 \101\108\101\109\101\110\116",function()local E=p.new({1;1;1;1,1})local R=p.new({1})E:AddAll(R);(expect(E:Count())).to.equal(6)end)end)describe("\067\108\101\097\114",function()it("\115\104\111\117\108\100 \099\108\101\097\114 \097\108\108 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3;4;5});(expect(E:Empty())).to.equal(false)E:Clear();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \099\108\101\097\114 \119\104\101\110 \097\108\114\101\097\100\121 \101\109\112\116\121",function()local E=p.new()E:Clear();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \099\108\101\097\114 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Clear();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \099\108\101\097\114 \119\105\116\104 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3,4;5})E:Clear();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \099\108\101\097\114 \119\105\116\104 \100\117\112\108\105\099\097\116\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1,1,1,1;1})E:Clear();(expect(E:Empty())).to.equal(true)end)end)describe("\082\101\109\111\118\101",function()it("\115\104\111\117\108\100 \115\117\099\099\101\115\115\102\117\108\108\121 \097\116\116\101\109\112\116 \116\111 \114\101\109\111\118\101 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:Remove(1)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \114\101\109\111\118\101 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(E:Remove(1))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Remove(1);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:Remove(1))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \097\110 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1;2,3;4;5})E:Remove(3);(expect(E:Count())).to.equal(4)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \097\110 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1,2,3;4;5});(expect(E:Remove(3))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \114\101\109\111\118\101 \119\104\101\110 \116\104\101 \101\108\101\109\101\110\116 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1,2,3,4;5})E:Remove(6);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \097\110 \101\108\101\109\101\110\116 \105\115\110\'\116 \114\101\109\111\118\101\100",function()local E=p.new({1;2;3,4;5});(expect(E:Remove(6))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \116\104\101\114\101 \097\114\101 \100\117\112\108\105\099\097\116\101\115",function()local E=p.new({1;1,1;1,1})E:Remove(1);(expect(E:Count())).to.equal(4)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \097 \100\117\112\108\105\099\097\116\101",function()local E=p.new({1;1,1;1;1});(expect(E:Remove(1))).to.equal(true)end)end)describe("\082\101\109\111\118\101\065\108\108",function()it("\115\104\111\117\108\100 \115\117\099\099\101\115\115\102\117\108\108\121 \097\116\116\101\109\112\116 \116\111 \114\101\109\111\118\101 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1;2;3,4,5});(expect(function()E:RemoveAll(R)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \114\101\109\111\118\101 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2;3;4,5});(expect(E:RemoveAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({1})E:RemoveAll(R);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({1});(expect(E:RemoveAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \119\105\116\104 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115",function()local E=p.new({1})local R=p.new({1,2,3;4;5})E:RemoveAll(R);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \119\105\116\104 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115",function()local E=p.new({1})local R=p.new({1,2;3,4;5});(expect(E:RemoveAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \111\110\101 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1,2;3;4,5})local R=p.new({1})E:RemoveAll(R);(expect(E:Count())).to.equal(4)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \111\110\101 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1;2;3;4;5})local R=p.new({1});(expect(E:RemoveAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \114\101\109\111\118\101 \119\104\101\110 \116\104\101 \101\108\101\109\101\110\116 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1,2,3;4,5})local R=p.new({0})E:RemoveAll(R);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \097\110 \101\108\101\109\101\110\116 \105\115\110\'\116 \114\101\109\111\118\101\100",function()local E=p.new({1,2,3,4,5})local R=p.new({0});(expect(E:RemoveAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3,4,5})local R=p.new({1;2,3,4;5})E:RemoveAll(R);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2;3;4,5})local R=p.new({1;2;3,4,5});(expect(E:RemoveAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \111\110\108\121 \111\110\099\101 \102\111\114 \101\097\099\104 \111\099\099\117\114\114\101\110\099\101 \111\102 \100\117\112\108\105\099\097\116\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1;1;1;1;1})local R=p.new({1,1,1})E:RemoveAll(R);(expect(E:Count())).to.equal(2)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \100\117\112\108\105\099\097\116\101\115",function()local E=p.new({1;1;1;1;1})local R=p.new({1,1,1});(expect(E:RemoveAll(R))).to.equal(true)end)end)describe("\082\101\116\097\105\110\065\108\108",function()it("\115\104\111\117\108\100 \115\117\099\099\101\115\115\102\117\108\108\121 \097\116\116\101\109\112\116 \116\111 \114\101\116\097\105\110 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2,3;4;5});(expect(function()E:RetainAll(R)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2;3;4,5});(expect(E:RetainAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({1})E:RetainAll(R);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({1});(expect(E:RetainAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \119\105\116\104 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115 \116\111 \114\101\116\097\105\110",function()local E=p.new({1})local R=p.new({1,2;3,4;5})E:RetainAll(R);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \119\105\116\104 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115 \116\111 \114\101\116\097\105\110",function()local E=p.new({1})local R=p.new({1,2;3,4;5});(expect(E:RetainAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \114\101\116\097\105\110 \111\110\101 \101\108\101\109\101\110\116 \116\104\097\116 \100\111\101\115 \110\111\116 \109\097\116\099\104",function()local E=p.new({1})local R=p.new({0})E:RetainAll(R);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \110\111\116 \114\101\116\097\105\110\105\110\103 \111\110\101 \101\108\101\109\101\110\116 \116\104\097\116 \100\111\101\115 \110\111\116 \109\097\116\099\104",function()local E=p.new({1})local R=p.new({0});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \111\110\101 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1;2;3;4,5})local R=p.new({3})E:RetainAll(R);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \111\110\101 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1,2,3,4;5})local R=p.new({3});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \110\111 \101\108\101\109\101\110\116\115 \119\104\101\110 \111\110\101 \101\108\101\109\101\110\116 \100\111\101\115 \110\111\116 \109\097\116\099\104",function()local E=p.new({1;2;3,4,5})local R=p.new({6})E:RetainAll(R);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \110\111\116 \114\101\116\097\105\110\105\110\103 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1;2;3,4;5})local R=p.new({6});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \109\111\114\101 \101\120\105\115\116",function()local E=p.new({1,2;3,4,5})local R=p.new({1,3;5})E:RetainAll(R);(expect(E:Count())).to.equal(3)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \109\111\114\101 \101\120\105\115\116",function()local E=p.new({1;2;3;4,5})local R=p.new({1,3;5});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \114\101\116\097\105\110 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4;5})local R=p.new({0;1,3})E:RetainAll(R);(expect(E:Count())).to.equal(2)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \097\116\116\101\109\112\105\110\103 \116\111 \114\101\116\097\105\110 \119\105\116\104 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4,5})local R=p.new({0,1;3});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \097\108\108 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3,4;5})local R=p.new({1,2;3,4;5})E:RetainAll(R);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \097\108\108 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3;4,5})local R=p.new({1,2,3;4,5});(expect(E:RetainAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \114\101\116\097\105\110 \101\120\099\101\115\115",function()local E=p.new({1,2,3,4,5})local R=p.new({0,1,2;3,4,5})E:RetainAll(R);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \114\101\116\097\105\110 \101\120\099\101\101\115\115 \097\110\100 \114\101\116\097\105\110\105\110\103 \097\108\108 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3;4;5})local R=p.new({0,1;2;3;4,5});(expect(E:RetainAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \097\108\108 \100\117\112\108\105\099\097\116\101\115",function()local E=p.new({1,1;2;2;3})local R=p.new({1;2})E:RetainAll(R);(expect(E:Count())).to.equal(4)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \100\117\112\108\105\099\097\116\101\115 \097\110\100 \109\111\114\101 \101\120\105\115\116",function()local E=p.new({1,1,2,2;3})local R=p.new({1;2});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \097\108\108 \100\117\112\108\105\099\097\116\101\115 \119\104\101\110 \097\116\116\101\109\112\105\110\103 \116\111 \114\101\116\097\105\110 \101\120\099\101\115\115",function()local E=p.new({1;1;1;1,1})local R=p.new({1;2})E:RetainAll(R);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \097\108\108 \100\117\112\108\105\099\097\116\101\115",function()local E=p.new({1,1,1,1,1})local R=p.new({1});(expect(E:RetainAll(R))).to.equal(false)end)end)end)end)describe("\081\117\101\117\101 \073\110\116\101\114\102\097\099\101",function()describe("\070\105\114\115\116",function()it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:First()end)).to.throw("\078\111 \102\105\114\115\116 \101\108\101\109\101\110\116 \101\120\105\115\116\115\046")end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \102\105\114\115\116 \101\108\101\109\101\110\116 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:First())).to.equal(1)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \102\105\114\115\116 \101\108\101\109\101\110\116 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3;4;5});(expect(E:First())).to.equal(1)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \102\105\114\115\116 \101\108\101\109\101\110\116 \119\104\101\110 \101\108\101\109\101\110\116\115 \097\114\101 \114\101\109\111\118\101\100",function()local E=p.new({1,2,3;4,5})E:Shift();(expect(E:First())).to.equal(2)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \097\108\108 \101\108\101\109\101\110\116\115 \104\097\118\101 \098\101\101\110 \114\101\109\111\118\101\100",function()local E=p.new({1,2,3;4;5})while E:Count()>0 do E:Shift()end;(expect(function()E:First()end)).to.throw("\078\111 \102\105\114\115\116 \101\108\101\109\101\110\116 \101\120\105\115\116\115\046")end)end)describe("\080\117\115\104",function()it("\115\104\111\117\108\100 \097\100\100 \097\110 \105\116\101\109 \116\111 \116\104\101 \101\110\100 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()E:Push(1);(expect(E:First())).to.equal(1);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \097\100\100 \097\110 \105\116\101\109 \116\111 \116\104\101 \101\110\100 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Push(2);(expect(E:Count())).to.equal(2)E:Shift();(expect(E:First())).to.equal(2)end)it("\115\104\111\117\108\100 \097\100\100 \097\110 \105\116\101\109 \116\111 \116\104\101 \101\110\100 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3,4,5})E:Push(6);(expect(E:Count())).to.equal(6)while E:Count()>1 do E:Shift()end;(expect(E:First())).to.equal(6)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101",function()local E=p.new({1,2,3;4,5});(expect(E:Push(6))).to.equal(true)end)end)describe("\083\104\105\102\116",function()it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:Shift()end)).to.throw("\078\111 \102\105\114\115\116 \101\108\101\109\101\110\116 \101\120\105\115\116\115\046")end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \097\110 \105\116\101\109 \102\114\111\109 \116\104\101 \098\101\103\105\110\110\105\110\103 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Shift();(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \101\108\101\109\101\110\116 \119\104\101\110 \114\101\109\111\118\105\110\103 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:Shift())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \097\110 \105\116\101\109 \102\114\111\109 \116\104\101 \098\101\103\105\110\110\105\110\103 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4,5})E:Shift();(expect(E:First())).to.equal(2);(expect(E:Count())).to.equal(4)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \101\108\101\109\101\110\116 \119\104\101\110 \114\101\109\111\118\105\110\103 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2;3,4;5});(expect(E:Shift())).to.equal(1)end)end)end)end
--- Tests for the @{LinkedQueue} class.

return function()
	local module = game:GetService("ReplicatedStorage").Packages.Monolith
	local LinkedQueue = require(module.LinkedQueue)

	describe("Constructor", function()
		it("should create an empty LinkedQueue", function()
			local queue = LinkedQueue.new()
			expect(queue:Empty()).to.equal(true)
		end)

		it("should create a LinkedQueue from a table", function()
			local items = { 1, 2, 3, 4, 5 }
			local queue = LinkedQueue.new(items)
			expect(queue:Count()).to.equal(#items)
			local index = 1
			while queue:Count() > 0 do
				local item = queue:Shift()
				expect(item).to.equal(items[index])
				index = index + 1
			end
		end)

		it("should create a LinkedQueue from a Collection", function()
			local items = LinkedQueue.new({ 1, 2, 3, 4, 5 })
			local queue = LinkedQueue.new(items)
			expect(queue:Count()).to.equal(items:Count())
			while queue:Count() > 0 do
				local item = queue:Shift()
				local original = items:Shift()
				expect(item).to.equal(original)
			end
		end)

		it("should error when attempting to create a LinkedQueue from a non-table", function()
			expect(function()
				LinkedQueue.new(true)
			end).to.throw("Cannot construct LinkedQueue from type boolean.")
			expect(function()
				LinkedQueue.new(1)
			end).to.throw("Cannot construct LinkedQueue from type number.")
			expect(function()
				LinkedQueue.new("string")
			end).to.throw("Cannot construct LinkedQueue from type string.")
			expect(function()
				LinkedQueue.new(function() end)
			end).to.throw("Cannot construct LinkedQueue from type function.")
			expect(function()
				LinkedQueue.new(Instance.new("Folder"))
			end).to.throw("Cannot construct LinkedQueue from type userdata.")
			expect(function()
				LinkedQueue.new(coroutine.create(function() end))
			end).to.throw("Cannot construct LinkedQueue from type thread.")
		end)
	end)

	describe("Enumerable Interface", function()
		describe("Enumerator", function()
			it("should provide an iterator generator", function()
				local queue = LinkedQueue.new()
				local generator = queue:Enumerator()
				expect(generator).to.be.a("function")
			end)

			it("should enumerate in a generic for loop", function()
				local queue = LinkedQueue.new()
				local total = 10
				for i = 1, total do
					queue:Add(i)
				end

				local count = 0
				for i, v in queue:Enumerator() do
					count = count + 1
					expect(i).to.be.a("number")
					expect(v).to.be.a("number")
				end

				expect(count).to.equal(total)
			end)
		end)
	end)

	describe("Collection Interface", function()
		describe("Required Methods", function()
			describe("Contains", function()
				it("should not find any element when empty", function()
					local queue = LinkedQueue.new()
					expect(queue:Contains(0)).to.equal(false)
				end)

				it("should find an element when that element exists", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:Contains(1)).to.equal(true)
				end)

				it("should not find an element when that element does not exist", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:Contains(0)).to.equal(false)
				end)

				it("should not find an element until it is added", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:Contains(0)).to.equal(false)
					queue:Add(0)
					expect(queue:Contains(0)).to.equal(true)
				end)

				it("should no longer find an element when its removed", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:Contains(1)).to.equal(true)
					queue:Remove(1)
					expect(queue:Contains(1)).to.equal(false)
				end)
			end)

			describe("ContainsAll", function()
				it("should not find any element when empty", function()
					local queue = LinkedQueue.new()
					local contained = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:ContainsAll(contained)).to.equal(false)
				end)

				it("should find all zero elements when the provided Collection is empty", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedQueue.new()
					expect(queue:ContainsAll(contained)).to.equal(true)
				end)

				it("should find all elements when all of the elements exist", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:ContainsAll(contained)).to.equal(true)
				end)

				it("should find one element when it exists", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedQueue.new({ 3 })
					expect(queue:ContainsAll(contained)).to.equal(true)
				end)

				it("should not find all elements when one does not exist", function()
					local queue = LinkedQueue.new({ 1, 2, 4, 5 })
					local contained = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:ContainsAll(contained)).to.equal(false)
				end)

				it("should not find one element when it does not exist", function()
					local queue = LinkedQueue.new({ 1, 2, 4, 5 })
					local contained = LinkedQueue.new({ 3 })
					expect(queue:ContainsAll(contained)).to.equal(false)
				end)

				it("should not find all elements until they are added", function()
					local queue = LinkedQueue.new()
					local contained = LinkedQueue.new({ 1, 2 })
					expect(queue:ContainsAll(contained)).to.equal(false)
					queue:Add(1)
					expect(queue:ContainsAll(contained)).to.equal(false)
					queue:Add(2)
					expect(queue:ContainsAll(contained)).to.equal(true)
				end)

				it("should no longer find all elements when they are removed", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:ContainsAll(contained)).to.equal(true)
					queue:Remove(1)
					expect(queue:ContainsAll(contained)).to.equal(false)
				end)
			end)

			describe("ContainsAny", function()
				it("should not find any element when empty", function()
					local queue = LinkedQueue.new()
					local contained = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:ContainsAny(contained)).to.equal(false)
				end)

				it("should not find any element when the provided Collection is empty", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedQueue.new()
					expect(queue:ContainsAny(contained)).to.equal(false)
				end)

				it("should find all elements when the elements exist", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:ContainsAny(contained)).to.equal(true)
				end)

				it("should find one element when it exists", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedQueue.new({ 3 })
					expect(queue:ContainsAny(contained)).to.equal(true)
				end)

				it("should find some elements when only one does not exist", function()
					local queue = LinkedQueue.new({ 1, 2, 4, 5 })
					local contained = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:ContainsAny(contained)).to.equal(true)
				end)

				it("should not find one element when it does not exist", function()
					local queue = LinkedQueue.new({ 1, 2, 4, 5 })
					local contained = LinkedQueue.new({ 3 })
					expect(queue:ContainsAny(contained)).to.equal(false)
				end)

				it("should not find elements until they are added", function()
					local queue = LinkedQueue.new()
					local contained = LinkedQueue.new({ 1, 2 })
					expect(queue:ContainsAny(contained)).to.equal(false)
					queue:Add(1)
					expect(queue:ContainsAny(contained)).to.equal(true)
				end)

				it("should no longer find all elements when they are all removed", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:ContainsAny(contained)).to.equal(true)
					queue:Remove(1)
					expect(queue:ContainsAny(contained)).to.equal(true)
					queue:Clear()
					expect(queue:ContainsAny(contained)).to.equal(false)
				end)
			end)

			describe("Count", function()
				it("should count zero when empty", function()
					local queue = LinkedQueue.new()
					expect(queue:Count()).to.equal(0)
				end)

				it("should count the number of elements in the LinkedQueue", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:Count()).to.equal(5)
				end)

				it("should count new elements when they are added", function()
					local queue = LinkedQueue.new()
					local total = 10
					expect(queue:Count()).to.equal(0)
					for i = 1, total do
						queue:Add(i)
						expect(queue:Count()).to.equal(i)
					end
					expect(queue:Count()).to.equal(total)
				end)

				it("should not count elements after they are removed", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local count = queue:Count()
					expect(count).to.equal(5)
					while count > 0 do
						queue:Shift()
						local oldCount = count
						count = queue:Count()
						expect(count).to.equal(oldCount - 1)
					end
				end)

				it("should count zero after being cleared", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:Count()).to.equal(5)
					queue:Clear()
					expect(queue:Count()).to.equal(0)
				end)
			end)

			describe("Empty", function()
				it("should be empty when instantiated", function()
					local queue = LinkedQueue.new()
					expect(queue:Empty()).to.equal(true)
				end)

				it("should not be empty with one element", function()
					local queue = LinkedQueue.new({ 1 })
					expect(queue:Empty()).to.equal(false)
				end)

				it("should not be empty with multiple elements", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:Empty()).to.equal(false)
				end)

				it("should no longer be empty after an element is added", function()
					local queue = LinkedQueue.new()
					expect(queue:Empty()).to.equal(true)
					queue:Add(1)
					expect(queue:Empty()).to.equal(false)
				end)

				it("should be empty after all elements are removed", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					while queue:Count() > 0 do
						expect(queue:Empty()).to.equal(false)
						queue:Shift()
					end
					expect(queue:Empty()).to.equal(true)
				end)

				it("should be empty after being cleared", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:Empty()).to.equal(false)
					queue:Clear()
					expect(queue:Empty()).to.equal(true)
				end)
			end)

			describe("ToArray", function()
				it("should return a table", function()
					local queue = LinkedQueue.new()
					expect(queue:ToArray()).to.be.a("table")
				end)

				it("should create a table of the same size", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(#queue:ToArray()).to.equal(queue:Count())
				end)

				it("should create an empty table when empty", function()
					local queue = LinkedQueue.new()
					expect(#queue:ToArray()).to.equal(0)
				end)

				it("should create a table with the same elements and order of enumeration", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local array = queue:ToArray()
					expect(#array).to.equal(queue:Count())
					for _, v in ipairs(array) do
						expect(v).to.equal(queue:Shift())
					end
				end)

				it("should provide only array indexable elements", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local array = queue:ToArray()
					local count = 0
					for _ in pairs(array) do
						count = count + 1
					end
					expect(count).to.equal(#array)
				end)
			end)

			describe("ToTable", function()
				it("should provide the same representation as ToArray", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local array = queue:ToArray()
					local table = queue:ToTable()
					expect(table).to.be.a("table")
					expect(#table).to.equal(#array)
					for i, v in pairs(table) do
						expect(v).to.equal(array[i])
					end
				end)
			end)
		end)

		describe("Optional Methods", function()
			describe("Add", function()
				it("should add elements when empty", function()
					local queue = LinkedQueue.new()
					queue:Add(1)
					expect(queue:Count()).to.equal(1)
				end)

				it("should add elements when not empty", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					queue:Add(6)
					expect(queue:Count()).to.equal(6)
				end)

				it("should add elements to the end", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					queue:Add(1)
					while queue:Count() > 1 do
						queue:Shift()
					end
					expect(queue:First()).to.equal(1)
				end)

				it("should return true", function()
					local queue = LinkedQueue.new()
					expect(queue:Add(1)).to.equal(true)
				end)

				it("should add duplicate elements", function()
					local queue = LinkedQueue.new({ 1, 1, 1, 1, 1 })
					queue:Add(1)
					expect(queue:Count()).to.equal(6)
				end)
			end)

			describe("AddAll", function()
				it("should add multiple elements when empty", function()
					local queue = LinkedQueue.new()
					local add = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					queue:AddAll(add)
					expect(queue:Count()).to.equal(5)
				end)

				it("should add one element when empty", function()
					local queue = LinkedQueue.new()
					local add = LinkedQueue.new({ 1 })
					queue:AddAll(add)
					expect(queue:Count()).to.equal(1)
				end)

				it("should add multiple elements when not empty", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local add = LinkedQueue.new({ 6, 7, 8, 9, 0 })
					queue:AddAll(add)
					expect(queue:Count()).to.equal(10)
				end)

				it("should add one element when not empty", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local add = LinkedQueue.new({ 6 })
					queue:AddAll(add)
					expect(queue:Count()).to.equal(6)
				end)

				it("should add multiple elements to the end", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local add = LinkedQueue.new({ 6, 7, 8, 9, 10 })
					queue:AddAll(add)
					while queue:Count() > add:Count() do
						queue:Shift()
					end
					expect(queue:Shift()).to.equal(6)
					expect(queue:Shift()).to.equal(7)
					expect(queue:Shift()).to.equal(8)
					expect(queue:Shift()).to.equal(9)
					expect(queue:Shift()).to.equal(10)
				end)

				it("should add one element to the end", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local add = LinkedQueue.new({ 6 })
					queue:AddAll(add)
					while queue:Count() > 1 do
						queue:Shift()
					end
					expect(queue:First()).to.equal(6)
				end)

				it("should return true when adding multiple elements", function()
					local queue = LinkedQueue.new()
					local add = LinkedQueue.new({ 6, 7, 8, 9, 10 })
					expect(queue:AddAll(add)).to.equal(true)
				end)

				it("should return true when adding one element", function()
					local queue = LinkedQueue.new()
					local add = LinkedQueue.new({ 6 })
					expect(queue:AddAll(add)).to.equal(true)
				end)

				it("should add multiple duplicate elements", function()
					local queue = LinkedQueue.new({ 1, 1, 1, 1, 1 })
					local add = LinkedQueue.new({ 1, 1, 1, 1, 1 })
					queue:AddAll(add)
					expect(queue:Count()).to.equal(10)
				end)

				it("should add one duplicate element", function()
					local queue = LinkedQueue.new({ 1, 1, 1, 1, 1 })
					local add = LinkedQueue.new({ 1 })
					queue:AddAll(add)
					expect(queue:Count()).to.equal(6)
				end)
			end)

			describe("Clear", function()
				it("should clear all elements", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:Empty()).to.equal(false)
					queue:Clear()
					expect(queue:Empty()).to.equal(true)
				end)

				it("should clear when already empty", function()
					local queue = LinkedQueue.new()
					queue:Clear()
					expect(queue:Empty()).to.equal(true)
				end)

				it("should clear with one element", function()
					local queue = LinkedQueue.new({ 1 })
					queue:Clear()
					expect(queue:Empty()).to.equal(true)
				end)

				it("should clear with multiple elements", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					queue:Clear()
					expect(queue:Empty()).to.equal(true)
				end)

				it("should clear with duplicate elements", function()
					local queue = LinkedQueue.new({ 1, 1, 1, 1, 1 })
					queue:Clear()
					expect(queue:Empty()).to.equal(true)
				end)
			end)

			describe("Remove", function()
				it("should successfully attempt to remove when empty", function()
					local queue = LinkedQueue.new()
					expect(function()
						queue:Remove(1)
					end).never.to.throw()
				end)

				it("should return false when attempting to remove when empty", function()
					local queue = LinkedQueue.new()
					expect(queue:Remove(1)).to.equal(false)
				end)

				it("should remove one element", function()
					local queue = LinkedQueue.new({ 1 })
					queue:Remove(1)
					expect(queue:Count()).to.equal(0)
				end)

				it("should return true when removing one element", function()
					local queue = LinkedQueue.new({ 1 })
					expect(queue:Remove(1)).to.equal(true)
				end)

				it("should remove an element from many", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					queue:Remove(3)
					expect(queue:Count()).to.equal(4)
				end)

				it("should return true when removing an element from many", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:Remove(3)).to.equal(true)
				end)

				it("should not remove when the element does not exist", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					queue:Remove(6)
					expect(queue:Count()).to.equal(5)
				end)

				it("should return false when an element isn't removed", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:Remove(6)).to.equal(false)
				end)

				it("should remove one element when there are duplicates", function()
					local queue = LinkedQueue.new({ 1, 1, 1, 1, 1 })
					queue:Remove(1)
					expect(queue:Count()).to.equal(4)
				end)

				it("should return true when removing a duplicate", function()
					local queue = LinkedQueue.new({ 1, 1, 1, 1, 1 })
					expect(queue:Remove(1)).to.equal(true)
				end)
			end)

			describe("RemoveAll", function()
				it("should successfully attempt to remove when empty", function()
					local queue = LinkedQueue.new()
					local remove = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(function()
						queue:RemoveAll(remove)
					end).never.to.throw()
				end)

				it("should return false when attempting to remove when empty", function()
					local queue = LinkedQueue.new()
					local remove = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:RemoveAll(remove)).to.equal(false)
				end)

				it("should remove one element", function()
					local queue = LinkedQueue.new({ 1 })
					local remove = LinkedQueue.new({ 1 })
					queue:RemoveAll(remove)
					expect(queue:Count()).to.equal(0)
				end)

				it("should return true when removing one element", function()
					local queue = LinkedQueue.new({ 1 })
					local remove = LinkedQueue.new({ 1 })
					expect(queue:RemoveAll(remove)).to.equal(true)
				end)

				it("should remove with excess elements", function()
					local queue = LinkedQueue.new({ 1 })
					local remove = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					queue:RemoveAll(remove)
					expect(queue:Count()).to.equal(0)
				end)

				it("should return true when removing with excess elements", function()
					local queue = LinkedQueue.new({ 1 })
					local remove = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:RemoveAll(remove)).to.equal(true)
				end)

				it("should remove one element from many", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedQueue.new({ 1 })
					queue:RemoveAll(remove)
					expect(queue:Count()).to.equal(4)
				end)

				it("should return true when removing one element from many", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedQueue.new({ 1 })
					expect(queue:RemoveAll(remove)).to.equal(true)
				end)

				it("should not remove when the element does not exist", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedQueue.new({ 0 })
					queue:RemoveAll(remove)
					expect(queue:Count()).to.equal(5)
				end)

				it("should return false when an element isn't removed", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedQueue.new({ 0 })
					expect(queue:RemoveAll(remove)).to.equal(false)
				end)

				it("should remove multiple elements", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					queue:RemoveAll(remove)
					expect(queue:Count()).to.equal(0)
				end)

				it("should return true when removing multiple elements", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:RemoveAll(remove)).to.equal(true)
				end)

				it("should remove only once for each occurrence of duplicate elements", function()
					local queue = LinkedQueue.new({ 1, 1, 1, 1, 1 })
					local remove = LinkedQueue.new({ 1, 1, 1 })
					queue:RemoveAll(remove)
					expect(queue:Count()).to.equal(2)
				end)

				it("should return true when removing duplicates", function()
					local queue = LinkedQueue.new({ 1, 1, 1, 1, 1 })
					local remove = LinkedQueue.new({ 1, 1, 1 })
					expect(queue:RemoveAll(remove)).to.equal(true)
				end)
			end)

			describe("RetainAll", function()
				it("should successfully attempt to retain when empty", function()
					local queue = LinkedQueue.new()
					local retain = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(function()
						queue:RetainAll(retain)
					end).never.to.throw()
				end)

				it("should return false when retaining when empty", function()
					local queue = LinkedQueue.new()
					local retain = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:RetainAll(retain)).to.equal(false)
				end)

				it("should retain one element", function()
					local queue = LinkedQueue.new({ 1 })
					local retain = LinkedQueue.new({ 1 })
					queue:RetainAll(retain)
					expect(queue:Count()).to.equal(1)
				end)

				it("should return false when retaining one element", function()
					local queue = LinkedQueue.new({ 1 })
					local retain = LinkedQueue.new({ 1 })
					expect(queue:RetainAll(retain)).to.equal(false)
				end)

				it("should retain with excess elements to retain", function()
					local queue = LinkedQueue.new({ 1 })
					local retain = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					queue:RetainAll(retain)
					expect(queue:Count()).to.equal(1)
				end)

				it("should return false when retaining with excess elements to retain", function()
					local queue = LinkedQueue.new({ 1 })
					local retain = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:RetainAll(retain)).to.equal(false)
				end)

				it("should not retain one element that does not match", function()
					local queue = LinkedQueue.new({ 1 })
					local retain = LinkedQueue.new({ 0 })
					queue:RetainAll(retain)
					expect(queue:Count()).to.equal(0)
				end)

				it("should return true when not retaining one element that does not match", function()
					local queue = LinkedQueue.new({ 1 })
					local retain = LinkedQueue.new({ 0 })
					expect(queue:RetainAll(retain)).to.equal(true)
				end)

				it("should retain one element from many", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 3 })
					queue:RetainAll(retain)
					expect(queue:Count()).to.equal(1)
				end)

				it("should return true when retaining one element from many", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 3 })
					expect(queue:RetainAll(retain)).to.equal(true)
				end)

				it("should retain no elements when one element does not match", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 6 })
					queue:RetainAll(retain)
					expect(queue:Count()).to.equal(0)
				end)

				it("should return true when not retaining one element", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 6 })
					expect(queue:RetainAll(retain)).to.equal(true)
				end)

				it("should retain multiple elements when more exist", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 1, 3, 5 })
					queue:RetainAll(retain)
					expect(queue:Count()).to.equal(3)
				end)

				it("should return true when retaining multiple elements when more exist", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 1, 3, 5 })
					expect(queue:RetainAll(retain)).to.equal(true)
				end)

				it("should retain multiple elements when attempting to retain excess elements", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 0, 1, 3 })
					queue:RetainAll(retain)
					expect(queue:Count()).to.equal(2)
				end)

				it("should return true when attemping to retain with excess elements", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 0, 1, 3 })
					expect(queue:RetainAll(retain)).to.equal(true)
				end)

				it("should retain all elements", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					queue:RetainAll(retain)
					expect(queue:Count()).to.equal(5)
				end)

				it("should return false when retaining all elements", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					expect(queue:RetainAll(retain)).to.equal(false)
				end)

				it("should retain all elements when attempting to retain excess", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 0, 1, 2, 3, 4, 5 })
					queue:RetainAll(retain)
					expect(queue:Count()).to.equal(5)
				end)

				it("should return false when attempting to retain exceess and retaining all elements", function()
					local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedQueue.new({ 0, 1, 2, 3, 4, 5 })
					expect(queue:RetainAll(retain)).to.equal(false)
				end)

				it("should retain all duplicates", function()
					local queue = LinkedQueue.new({ 1, 1, 2, 2, 3 })
					local retain = LinkedQueue.new({ 1, 2 })
					queue:RetainAll(retain)
					expect(queue:Count()).to.equal(4)
				end)

				it("should return true when retaining duplicates and more exist", function()
					local queue = LinkedQueue.new({ 1, 1, 2, 2, 3 })
					local retain = LinkedQueue.new({ 1, 2 })
					expect(queue:RetainAll(retain)).to.equal(true)
				end)

				it("should retain all duplicates when attemping to retain excess", function()
					local queue = LinkedQueue.new({ 1, 1, 1, 1, 1 })
					local retain = LinkedQueue.new({ 1, 2 })
					queue:RetainAll(retain)
					expect(queue:Count()).to.equal(5)
				end)

				it("should return false when retaining all duplicates", function()
					local queue = LinkedQueue.new({ 1, 1, 1, 1, 1 })
					local retain = LinkedQueue.new({ 1 })
					expect(queue:RetainAll(retain)).to.equal(false)
				end)
			end)
		end)
	end)

	describe("Queue Interface", function()
		describe("First", function()
			it("should error when empty", function()
				local queue = LinkedQueue.new()
				expect(function()
					queue:First()
				end).to.throw("No first element exists.")
			end)

			it("should get the first element with one element", function()
				local queue = LinkedQueue.new({ 1 })
				expect(queue:First()).to.equal(1)
			end)

			it("should get the first element with many elements", function()
				local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
				expect(queue:First()).to.equal(1)
			end)

			it("should get the first element when elements are removed", function()
				local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
				queue:Shift()
				expect(queue:First()).to.equal(2)
			end)

			it("should error when all elements have been removed", function()
				local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
				while queue:Count() > 0 do
					queue:Shift()
				end
				expect(function()
					queue:First()
				end).to.throw("No first element exists.")
			end)
		end)

		describe("Push", function()
			it("should add an item to the end when empty", function()
				local queue = LinkedQueue.new()
				queue:Push(1)
				expect(queue:First()).to.equal(1)
				expect(queue:Count()).to.equal(1)
			end)

			it("should add an item to the end with one element", function()
				local queue = LinkedQueue.new({ 1 })
				queue:Push(2)
				expect(queue:Count()).to.equal(2)
				queue:Shift()
				expect(queue:First()).to.equal(2)
			end)

			it("should add an item to the end with many elements", function()
				local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
				queue:Push(6)
				expect(queue:Count()).to.equal(6)
				while queue:Count() > 1 do
					queue:Shift()
				end
				expect(queue:First()).to.equal(6)
			end)

			it("should return true", function()
				local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
				expect(queue:Push(6)).to.equal(true)
			end)
		end)

		describe("Shift", function()
			it("should error when empty", function()
				local queue = LinkedQueue.new()
				expect(function()
					queue:Shift()
				end).to.throw("No first element exists.")
			end)

			it("should remove an item from the beginning with one element", function()
				local queue = LinkedQueue.new({ 1 })
				queue:Shift()
				expect(queue:Count()).to.equal(0)
			end)

			it("should get the element when removing with one element", function()
				local queue = LinkedQueue.new({ 1 })
				expect(queue:Shift()).to.equal(1)
			end)

			it("should remove an item from the beginning with many elements", function()
				local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
				queue:Shift()
				expect(queue:First()).to.equal(2)
				expect(queue:Count()).to.equal(4)
			end)

			it("should get the element when removing with many elements", function()
				local queue = LinkedQueue.new({ 1, 2, 3, 4, 5 })
				expect(queue:Shift()).to.equal(1)
			end)
		end)
	end)
end
