           # The first modeling is for the T1 scan.
           mdl = subject.modeling[0]
           expect(mdl.source, "Modeling is missing a source").to.exist
-          expect(mdl.source.scanType, "Modeling source is missing the scan type")
+          expect(mdl.source.key, "Modeling source is missing the key")
             .to.exist
-          expect(mdl.source.scanType, "Modeling source scan type is incorrect")
+          expect(mdl.source.key, "Modeling source key is incorrect")
             .to.equal('t1')
-          mockMdl = mock.subject_detail.scan_sets.t1.modeling
+          mockMdl = mock.subject_detail.scan_sets.t1.modeling[0]
           expect(mdl.results, "Modeling is missing results").to.exist
           expect(mdl.results.length, "Modeling results count is incorrect").
             to.equal(1)

          birth_date: moment([1961, 6, 7]).valueOf()
          scan_sets:
            t1:
              modeling:
                results: [
                  delta_k_trans:
                    average: 2.6
                ]
            t2:
              modeling:
                results: [
                  delta_k_trans:
                    average: 2.4
                ]
          registration_configurations:
            reg_01:
              modeling:
                results: [
                  delta_k_trans:
                    average: 2.3
                ]
            reg_02:
              modeling:
                results: [
                  delta_k_trans:
                    average: 2.1
                ]
          sessions: [
            number: 1
            acquisition_date: moment('July 1, 2013').valueOf()

          $httpBackend.flush()

      describe 'Session Detail', ->
        mockSession = null

        # Validates the resolved session.
        validate = (session) ->
          scan = session.scans.t1
          expect(scan, "Session is missing the T1 scan").to.exist
          mockScan = mock.session_detail.scans.t1
          expect(scan.intensity, "Session scan is incorrect")
            .to.deep.eql(mockScan.intensity)
          expect(scan.intensity, "Session scan is incorrect")
            .to.deep.eql(mockScan.intensity)
          reg = scan.registrations[0]
          expect(reg, "Session is missing the T1 registration").to.exist
          mock_reg = mock.session_detail.scans.t1.registrations[0]
