                 index++;
             }
         }
+
+        [Test]
+        public function testSerialize():void
+        {
+            var s:Stream = $(1, 2, 3);
+            var b:ByteArray = new ByteArray();
+            b.writeObject(s);
+            b.position = 0;
+            var r:Stream = b.readObject();
+
+            for (var i:int = 0; i < s.length; i++)
+            {
+                assertEquals(s[i], r[i]);
+            }
+        }
     }
 }

    import com.kemsky.impl.filters.eq;
    import com.kemsky.impl.filters.ge;
    import com.kemsky.impl.filters.gt;
    import com.kemsky.impl.filters.prop;
    import com.kemsky.impl.filters.subtract;

    import flash.utils.Dictionary;

    import mx.collections.ArrayCollection;
    import mx.logging.ILogger;

            var s:Stream = $("1", "2", "1").filter(eq("2"));
            assertEquals(s.first, "2");
            assertEquals(s.length, 1);

            //todo
        }

        [Test]
        public function testLe():void
        {
            var le1:Stream = $(1, 2, 3).filter(le(2));
            assertEquals(le1.length, 2);
            assertEquals(le1[0], 1);
            assertEquals(le1[1], 2);
        }

        [Test]
        public function testLt():void
        {
            var lt1:Stream = $(1, 2, 3).filter(lt(2));
            assertEquals(lt1.length, 1);
            assertEquals(lt1[1], 1);
        }

        [Test]
        public function testGe():void
        {
            var ge1:Stream = $(1, 2, 3).filter(ge(2));
            assertEquals(ge1.length, 2);
            assertEquals(ge1[0], 2);
            assertEquals(ge1[1], 3);
        }

        [Test]
        public function testGt():void
        {
            var gt1:Stream = $(1, 2, 3).filter(gt(2));
            assertEquals(gt1.length, 1);
            assertEquals(gt1[1], 3);
        }

        [Test]
