<commit_before>package org.luxons.sevenwonders.test.api

import com.fasterxml.jackson.databind.module.SimpleModule
import com.fasterxml.jackson.module.kotlin.KotlinModule
import org.hildan.jackstomp.JackstompClient
import org.luxons.sevenwonders.config.SEVEN_WONDERS_WS_ENDPOINT
import org.luxons.sevenwonders.engine.resources.MutableResources
import org.luxons.sevenwonders.engine.resources.Resources
import org.springframework.messaging.converter.MappingJackson2MessageConverter
import java.util.concurrent.ExecutionException
import java.util.concurrent.TimeoutException

class SevenWondersClient {

    private val client: JackstompClient

    init {
        val customMappingsModule = SimpleModule("ConcreteResourcesDeserializationModule")
        customMappingsModule.addAbstractTypeMapping(Resources::class.java, MutableResources::class.java)

        val mappingJackson2MessageConverter = MappingJackson2MessageConverter()
        mappingJackson2MessageConverter.objectMapper.registerModule(customMappingsModule)
        mappingJackson2MessageConverter.objectMapper.registerModule(KotlinModule())

        client = JackstompClient()
        client.webSocketClient.messageConverter = mappingJackson2MessageConverter
    }

    @Throws(InterruptedException::class, ExecutionException::class, TimeoutException::class)
    fun connect(serverUrl: String): SevenWondersSession {
        val session = client.syncConnect(serverUrl + SEVEN_WONDERS_WS_ENDPOINT)
        return SevenWondersSession(session)
    }

    fun stop() {
        client.stop()
    }
}
<commit_msg>Remove unnecessary Resources deserializer in test JacksonMapper<commit_after>package org.luxons.sevenwonders.test.api

import com.fasterxml.jackson.module.kotlin.KotlinModule
import org.hildan.jackstomp.JackstompClient
import org.luxons.sevenwonders.config.SEVEN_WONDERS_WS_ENDPOINT
import org.springframework.messaging.converter.MappingJackson2MessageConverter
import java.util.concurrent.ExecutionException
import java.util.concurrent.TimeoutException

class SevenWondersClient {

    private val client: JackstompClient

    init {
        val mappingJackson2MessageConverter = MappingJackson2MessageConverter()
        mappingJackson2MessageConverter.objectMapper.registerModule(KotlinModule())

        client = JackstompClient()
        client.webSocketClient.messageConverter = mappingJackson2MessageConverter
    }

    @Throws(InterruptedException::class, ExecutionException::class, TimeoutException::class)
    fun connect(serverUrl: String): SevenWondersSession {
        val session = client.syncConnect(serverUrl + SEVEN_WONDERS_WS_ENDPOINT)
        return SevenWondersSession(session)
    }

    fun stop() {
        client.stop()
    }
}

{'fraction_non_alphanumeric': 0.07124495042232831, 'fraction_numerical': 0.004039662137348513, 'mean_word_length': 5.2620689655172415, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, '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': '4157343', 'n_tokens_mistral': 765, 'n_tokens_neox': 714, 'n_words': 108}