<commit_before>package seborama.demo1.kafka.ordercreation;

import org.apache.kafka.clients.producer.MockProducer;
import org.apache.kafka.common.serialization.StringSerializer;
import org.junit.Before;
import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;

public class OrderCreationProducerTest {
    private MockProducer<String, String> mockProducer;

    @Before
    public void setUp() throws Exception {
        mockProducer = new MockProducer<>(
                true,
                new StringSerializer(),
                new StringSerializer()
        );
    }

    @Test
    public void sendMessages() throws Exception {
        int numberOfMessages = 12;
        try (OrderCreationProducer unit = new OrderCreationProducer(mockProducer, numberOfMessages, 0)) {
            unit.sendMessages();
            assertThat(mockProducer.history().size()).isEqualTo(numberOfMessages);
        }
    }

}<commit_msg>Reduced test message count<commit_after>package seborama.demo1.kafka.ordercreation;

import org.apache.kafka.clients.producer.MockProducer;
import org.apache.kafka.common.serialization.StringSerializer;
import org.junit.Before;
import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;

public class OrderCreationProducerTest {
    private MockProducer<String, String> mockProducer;

    @Before
    public void setUp() throws Exception {
        mockProducer = new MockProducer<>(
                true,
                new StringSerializer(),
                new StringSerializer()
        );
    }

    @Test
    public void sendMessages() throws Exception {
        int numberOfMessages = 7;
        try (OrderCreationProducer unit = new OrderCreationProducer(mockProducer, numberOfMessages, 0)) {
            unit.sendMessages();
            assertThat(mockProducer.history().size()).isEqualTo(numberOfMessages);
        }
    }

}
{'fraction_non_alphanumeric': 0.09024134312696747, 'fraction_numerical': 0.0036726128016789086, 'mean_word_length': 3.023206751054852, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7394930', 'n_tokens_mistral': 524, 'n_tokens_neox': 511, 'n_words': 107}