     @itemAfterKeyboardFocus = new Thread(id:'after-keyboard-focus')
 
     data = [@item, @itemFocus, @itemAfterFocus, @itemKeyboardFocus, @itemAfterKeyboardFocus]
+
+    @onFocusItem = jasmine.createSpy('onFocusItem')
+    @onSetCursorPosition = jasmine.createSpy('onSetCursorPosition')
     @selection = []
     @dataSource =
       selection:

        _.findIndex data, (item) -> item.id is id
      count: -> data.length

    @collection = 'threads'
    @handler = new MultiselectSplitInteractionHandler(@dataSource, @collection)
    @isRootSheet = true

    spyOn(WorkspaceStore, 'topSheet').andCallFake => {root: @isRootSheet}
    spyOn(Actions, 'setFocus')
    spyOn(Actions, 'setCursorPosition')

  it "should always show focus", ->
    expect(@handler.shouldShowFocus()).toEqual(true)

  describe "onClick", ->
    it "should focus the list item and indicate it was focused via click", ->
      @handler.onClick(@item)
      expect(@onFocusItem).toHaveBeenCalledWith(@item)

  describe "onMetaClick", ->
    describe "when there is currently a focused item", ->
      it "should turn the focused item into the first selected item", ->
        @handler.onMetaClick(@item)
        expect(@dataSource.selection.add).toHaveBeenCalledWith(@itemFocus)

      it "should clear the focus", ->
        @handler.onMetaClick(@item)
        expect(@onFocusItem).toHaveBeenCalledWith(null)

    it "should toggle selection", ->
      @handler.onMetaClick(@item)
