           onCompleted(405)
         ]
 
-    context 'flatMap', ->
-      type.is -> 'flatMap'
-      rootValue.is -> '1,2,3'
+    context.only 'flatMap', ->
+      structure.is ->
+        root:
+          type: 'of', id: 'rootId'
+        operators: [
+          {
+            type: 'flatMap'
+            id: 'flatMapId'
+            observable:
+              root:
+                type: 'of', id: 'secondRootId'
+              operators: [
+                { type: 'map', id: 'mapId' }
+              ]
+          }
+        ]
 
+      uiValues.is ->
+        rootId: '1,2,3'
+        flatMapId: 'function(topValue)'
+        secondRootId: "parseInt('1' + topValue)"
+        mapId: 'function(value) { return value * value }'
+
+      targetId.is -> 'mapId'
+
+      it 'has correct values', ->
+        console.log subject()
+

    context 'map', ->
      type.is -> 'map'
      rootValue.is -> '1,2,3'
      opValue.is -> 'return value * value;'

      it 'has correct values', ->
        expect(subject()).toEqual [

    context 'filter', ->
      type.is -> 'filter'
      rootValue.is -> '2,5,9,10'
      opValue.is -> 'function(value) { return value % 2 == 0 }'

      it 'has correct values', ->
        expect(subject()).toEqual [
