 
         describe 'destroyRunningKernelFor', ->
             it 'should destroy a running kernel for a grammar', ->
-                mockKernels =
-                    grammarlanguage: _.clone mockKernel
-                    kernel2: _.clone mockKernel
-
-                spyOn(mockKernels.grammarlanguage, 'destroy')
+                spyOn(mockKernels.kernel1, 'destroy')
                 spyOn(mockKernels.kernel2, 'destroy')
                 kernelManager._runningKernels = _.clone mockKernels
                 kernelManager.destroyRunningKernelFor mockGrammar
 
-                expect(mockKernels.grammarlanguage.destroy).toHaveBeenCalled()
+                expect(mockKernels.kernel1.destroy).toHaveBeenCalled()
                 expect(mockKernels.kernel2.destroy).not.toHaveBeenCalled()
                 expect(kernelManager._runningKernels.kernel2).not.toBeUndefined()
-                expect(kernelManager._runningKernels.grammarlanguage).toBeUndefined()
-
-
-        it 'should read lower case name from grammar', ->
-            expect(kernelManager.getLanguageFor mockGrammar)
-                .toEqual('grammarlanguage')
+                expect(kernelManager._runningKernels.kernel1).toBeUndefined()
+
+        describe 'getAllRunningKernels', ->
+            it 'should get all running kernels', ->
+                kernelManager._runningKernels = mockKernels
+                expect(kernelManager.getAllRunningKernels()).toEqual(mockKernels)
+
+        describe 'getRunningKernelFor', ->
+            it 'should get the running kernel for a language', ->
+                kernelManager._runningKernels = mockKernels
+                expect(kernelManager.getRunningKernelFor('kernel1'))
+                    .toEqual(mockKernel)
+
+        describe 'getLanguageFor', ->
+            it 'should read lower case name from grammar', ->
+                expect(kernelManager.getLanguageFor mockGrammar)
+                    .toEqual('kernel1')
 
     describe 'handle kernelspecs', ->
         firstKernelSpecString = '''{


    describe 'handle running kernels', ->
        mockGrammar =
            name: 'grammarLanguage'

        mockKernel =
            kernelSpec:
                language: 'kernelLanguage'
            destroy: ->

        describe 'destroy', ->
            it 'should destroy all running kernels', ->
                mockKernels =
                    kernel1: _.clone mockKernel
                    kernel2: _.clone mockKernel
                spyOn(mockKernels.kernel1, 'destroy')
                spyOn(mockKernels.kernel2, 'destroy')
                kernelManager._runningKernels = mockKernels


        describe 'setRunningKernelFor', ->
            it 'should set the running kernel for a grammar', ->
                grammar =
                    name: 'grammarLanguage'

                kernel =
                    kernelSpec:
                        language: 'kernelLanguage'
                    destroy: ->
                kernelManager.setRunningKernelFor grammar, kernel
                expect(kernelManager._runningKernels.grammarlanguage)
                    .not.toBeUndefined()
                expect(kernelManager._runningKernels.grammarlanguage
