<commit_before>package pt.up.fe.aiad.tests;

public class StatisticsTest {
/*
    @Test
    public void testSentMessage() throws Exception {
        Statistics s = new Statistics();

        s.sentMessage("A", "X");
        s.sentMessage("A", "X");
        s.sentMessage("B", "X");
        s.sentMessage("B", "Y");

        assertEquals(2, s.getSentMessages("A", "X"));
        assertEquals(0, s.getSentMessages("A", "Y"));
        assertEquals(1, s.getSentMessages("B", "X"));
        assertEquals(1, s.getSentMessages("B", "Y"));
        assertEquals(0, s.getSentMessages("C", "X"));
    }

    @Test
    public void testReceivedMessage() throws Exception {
        Statistics s = new Statistics();

        s.receivedMessage("A", "X");
        s.receivedMessage("A", "X");
        s.receivedMessage("B", "X");
        s.receivedMessage("B", "Y");

        assertEquals(2, s.getReceivedMessages("A", "X"));
        assertEquals(0, s.getReceivedMessages("A", "Y"));
        assertEquals(1, s.getReceivedMessages("B", "X"));
        assertEquals(1, s.getReceivedMessages("B", "Y"));
        assertEquals(0, s.getReceivedMessages("C", "X"));
    }
    */
}<commit_msg>Re-enable StatisticsTest<commit_after>package pt.up.fe.aiad.tests;

import org.junit.Test;
import pt.up.fe.aiad.scheduler.Statistics;

import static org.junit.Assert.assertEquals;

public class StatisticsTest {

    @Test
    public void testSentMessage() throws Exception {
        Statistics s = new Statistics();

        s.sentMessage("X");
        s.sentMessage("X");
        s.sentMessage("X");
        s.sentMessage("Y");

        assertEquals(3, s.getSentMessages("X"));
        assertEquals(1, s.getSentMessages("Y"));
        assertEquals(0, s.getSentMessages("Z"));
    }

    @Test
    public void testReceivedMessage() throws Exception {
        Statistics s = new Statistics();

        s.receivedMessage("X");
        s.receivedMessage("X");
        s.receivedMessage("X");
        s.receivedMessage("Y");

        assertEquals(3, s.getReceivedMessages("X"));
        assertEquals(1, s.getReceivedMessages("Y"));
        assertEquals(0, s.getReceivedMessages("Z"));
    }
}
{'fraction_non_alphanumeric': 0.17076566125290024, 'fraction_numerical': 0.007424593967517401, 'mean_word_length': 2.9271402550091077, 'pattern_counts': {'":': 0, '<': 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': '3620780', 'n_tokens_mistral': 650, 'n_tokens_neox': 629, 'n_words': 124}