<commit_before>package com.eharmony.matching.aloha.models

import org.junit.Test
import org.junit.runner.RunWith
import org.junit.internal.runners.JUnit4ClassRunner
import com.eharmony.matching.aloha.id.ModelId
import com.eharmony.matching.aloha.score.Scores.Score

@RunWith(classOf[JUnit4ClassRunner])
class ErrorModelTest {
    @Test def test1() {
        val em = ErrorModel(ModelId(), Seq("There should be a valid user ID.  Couldn't find one...", "blah blah"))
        val s: Score = em.score(null)
        println(s)
    }
}<commit_msg>Added to error model test<commit_after>package com.eharmony.matching.aloha.models

import org.junit.Test
import org.junit.Assert.assertNotNull
import org.junit.runner.RunWith
import com.eharmony.matching.aloha.id.ModelId
import com.eharmony.matching.aloha.score.Scores.Score
import com.eharmony.matching.aloha.factory.ModelFactory
import org.junit.runners.BlockJUnit4ClassRunner

@RunWith(classOf[BlockJUnit4ClassRunner])
class ErrorModelTest {
    @Test def test1() {
        val em = ErrorModel(ModelId(), Seq("There should be a valid user ID.  Couldn't find one...", "blah blah"))
        val s: Score = em.score(null)
        assertNotNull(s)
    }

    @Test def testEmptyErrors() {
        import spray.json._, DefaultJsonProtocol._
        import com.eharmony.matching.aloha.score.conversions.ScoreConverter.Implicits.ByteScoreConverter

        val json =
            """
              |{
              |  "modelType": "Error",
              |  "modelId": { "id": 0, "name": "" }
              |}
            """.stripMargin.trim.parseJson

        val m1 = ModelFactory.defaultFactory.getModel[Unit, Byte](json)
        assertNotNull(m1)

        val json2 =
            """
              |{
              |  "modelType": "Error",
              |  "modelId": { "id": 0, "name": "" },
              |  "errors": []
              |}
            """.stripMargin.trim.parseJson


        val m2 = ModelFactory.defaultFactory.getModel[Unit, Byte](json2)
        assertNotNull(m2)
    }
}
{'fraction_non_alphanumeric': 0.1235236220472441, 'fraction_numerical': 0.006889763779527559, 'mean_word_length': 2.5729349736379614, 'pattern_counts': {'":': 9, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6016078', 'n_tokens_mistral': 660, 'n_tokens_neox': 627, 'n_words': 121}