           expect(session.scans, "Session is missing the scans")
             .to.exist.and.not.be.empty
 
-        describe 'Scan', ->
-          scan = null
-          mockScan = mock.session_detail.sd1.scans[0]
-
-          beforeEach ->
-            try
-              scan = Session.getScan(session, 1)
-            catch ReferenceError
-              # Session couldn't resolve the scan.
-              # This is caught in the first test case.
-
-          it 'should have a session scan', ->
-            expect(scan, "The session is missing the scan").to.exist
-
-          it 'should reference the session', ->
-            expect(scan.session, "The scan is missing the session" +
-                                 " reference").to.exist
-            expect(scan.session, "The scan session reference is incorrect")
-               .to.equal(session)
-
-          describe 'Volume', ->
-            volume = null
-            mockVolume = mockScan.volumes.images[0]
-
-            beforeEach ->
-              try
-                volume = scan.volumes.images[0]
-              catch TypeError
-                # There is not a volumes array.
-
-            it 'should have a scan volume', ->
-              expect(scan.volumes, "The scan is missing volumes").to.exist
-              expect(scan.volumes.images.length, "The scan volumes length" +
-                                                 " is incorrect")
-                .to.equal(1)
-
-            it 'should reference the scan', ->
-              expect(volume.scan, "The volume is missing the scan reference")
-                .to.exist
-              expect(volume.scan, "The volume scan reference is incorrect")
-                 .to.equal(scan)
-
-            it 'should alias the imageSequence reference to the scan', ->
-              expect(volume.imageSequence, "The volume is missing the" +
-                                           " imageSequence alias")
-                .to.exist
-              expect(volume.imageSequence, "The volume imageSequence alias" +
-                                           " is incorrect")
-                .to.equal(scan)
-
-            it 'should have a volume number', ->
-              expect(volume.number, "The volume number is missing").to.exist
-              expect(volume.number, "The volume number is incorrect")
-                .to.equal(1)
-
-            it 'should have a name', ->
-              expect(volume.name, "The name is missing").to.exist
-              expect(volume.name, "The name is incorrect")
-                .to.equal(mockVolume.name)
-
-            it 'should have an intensity', ->
-              expect(volume.averageIntensity, "The voume intensity is missing")
-                .to.exist
-              expect(volume.averageIntensity, "The scan intensity is incorrect")
-                .to.equal(mockVolume.average_intensity)
-
-          describe 'Registration', ->
-            registration = null
-
-            beforeEach ->
-              try
-                registration = Session.getRegistration(scan, 'reg_01')
-              catch ReferenceError
-                # Session couldn't resolve the registration.
-
-            it 'should have a scan registration', ->
-              expect(registration, "The scan is missing the registration")
-                .to.exist
-
-            it 'should reference the scan', ->
-              expect(registration.scan, "The registration is missing the" +
-                                        " scan reference").to.exist
-              expect(registration.scan, "The registration scan reference" +
-                                        " is incorrect").to.equal(scan)
-
-            describe 'Volume', ->
-              volume = null
-              mockVolume = mockScan.registrations[0].volumes.images[0]
-
-              beforeEach ->
-                try
-                  volume = registration.volumes.images[0]
-                catch TypeError
-                  # There is not a volumes array.
-
-              it 'should have a registration volume', ->
-                expect(registration.volumes, "The registration is missing volumes")
-                  .to.exist
-                expect(registration.volumes.images.length,
-                       "The registration volumes length is incorrect").to.equal(1)
-
-              it 'should reference the registration', ->
-                expect(volume.registration,
-                       "The volume is missing the registration reference").to.exist
-                expect(volume.registration,
-                       "The volume registration reference is incorrect")
-                  .to.equal(registration)
-
-              it 'should alias the imageSequence reference to the registration', ->
-                expect(volume.imageSequence,
-                       "The volume is missing the imageSequence alias").to.exist
-                expect(volume.imageSequence,
-                       "The volume imageSequence alias is incorrect")
-                   .to.equal(registration)
-
-              it 'should have a volume number', ->
-                expect(volume.number, "The volume number is missing").to.exist
-                expect(volume.number, "The volume number is incorrect")
-                  .to.equal(1)
-
-              it 'should have a name', ->
-                expect(volume.name, "The name is missing").to.exist
-                expect(volume.name, "The name is incorrect")
-                  .to.equal(mockVolume.name)
-
-              it 'should have an intensity', ->
-                expect(volume.averageIntensity, "The voume intensity is missing")
-                  .to.exist
-                expect(volume.averageIntensity,
-                       "The registration intensity is incorrect")
-                  .to.equal(mockVolume.average_intensity)

                name: 'volume001.nii.gz'
                average_intensity: 2.4
              ]
            registrations: [
              _cls: 'Registration'
              protocol: 'rp1'
              time_series:
                name: 'reg_01'
                image: 'reg_01_ts.nii.gz'
              volumes:
                name: 'reg_01'
                images:  [
                  name: 'volume001.nii.gz'
                  average_intensity: 3.1
                ]
            ]
          ]

    describe 'Unit Testing the Session Service', ->
      Session = null
      session = null

      beforeEach ->

        ]
        session = _.cloneDeep(mock.session)
        # Extend the mock session.
        Session.extend(session, subject, 1)

      describe 'extend', ->
        it 'should reference the parent subject', ->
          expect(session.subject, "The session does not reference the" +
                                  " parent subject")
            .to.exist
          expect(session.subject, "The session subject reference is" +
                                  " incorrect")
            .to.equal(subject)

        describe 'Overlays', ->
          overlays = null

          beforeEach ->
            overlays = session.overlays

          it 'should have one modeling overlay', ->
            expect(overlays, "Modeling is missing overlays").to.exist
            expect(overlays.length, "Modeling overlays count is" +
                                    " incorrect")
              .to.equal(1)

          it 'should recapitulate the modeling result delta Ktrans overlay', ->
            expect(overlays[0], "Modeling result overlays is incorrect")
              .to.equal(session.modelings[0].result.deltaKTrans.labelMap)

        describe 'Modeling', ->
          modelingResult = null
          
          beforeEach ->
            modelingResult = session.modelings[0].result
          
          describe 'Parameter', ->
            paramResult = null

