<commit_before>package com.ltsllc.miranda.event;

import com.ltsllc.miranda.miranda.Miranda;
import com.ltsllc.miranda.test.TestCase;
import com.ltsllc.miranda.property.MirandaProperties;
import com.ltsllc.miranda.writer.Writer;
import org.junit.Before;
import org.junit.Test;

/**
 * Created by Clark on 2/22/2017.
 */
public class TestSystemMessages extends TestCase {
    private SystemMessages systemMessages;

    public SystemMessages getSystemMessages() {
        return systemMessages;
    }

    @Before
    public void setup() {
        reset();

        super.setup();

        setupWriter();
        setupMirandaProperties();

        MirandaProperties properties = Miranda.properties;
        String directory = properties.getProperty(MirandaProperties.PROPERTY_MESSAGES_DIRECTORY);
        systemMessages = new SystemMessages(directory, Writer.getInstance());
    }

    @Test
    public void testConstructor() {
        MirandaProperties properties = Miranda.properties;
        String directory = properties.getProperty(MirandaProperties.PROPERTY_MESSAGES_DIRECTORY);
        assert (getSystemMessages().getFilename().equals(directory));
        assert (getSystemMessages().getCurrentState() instanceof SystemMessagesReadyState);
    }

    @Test
    public void testIsFileOfInterest() {
        String interesting = "20170220-002.msg";
        String notInteresting = "junk";
        assert (getSystemMessages().isFileOfInterest(interesting));
        assert (!getSystemMessages().isFileOfInterest(notInteresting));
    }
}<commit_msg>Updated TestSystemMessages<commit_after>package com.ltsllc.miranda.event;

import com.ltsllc.miranda.miranda.Miranda;
import com.ltsllc.miranda.test.TestCase;
import com.ltsllc.miranda.property.MirandaProperties;
import com.ltsllc.miranda.writer.Writer;
import org.junit.Before;
import org.junit.Test;

/**
 * Created by Clark on 2/22/2017.
 */
public class TestSystemMessages extends TestCase {
    private SystemMessages systemMessages;

    public SystemMessages getSystemMessages() {
        return systemMessages;
    }

    @Before
    public void setup() {
        reset();

        super.setup();

        setuplog4j();
        setupWriter();
        setupMirandaProperties();

        MirandaProperties properties = Miranda.properties;
        String directory = properties.getProperty(MirandaProperties.PROPERTY_MESSAGES_DIRECTORY);
        systemMessages = new SystemMessages(directory, Writer.getInstance());
    }

    @Test
    public void testConstructor() {
        MirandaProperties properties = Miranda.properties;
        String directory = properties.getProperty(MirandaProperties.PROPERTY_MESSAGES_DIRECTORY);
        assert (getSystemMessages().getFilename().equals(directory));
        assert (getSystemMessages().getCurrentState() instanceof SystemMessagesReadyState);
    }

    @Test
    public void testIsFileOfInterest() {
        String interesting = "20170220-002.msg";
        String notInteresting = "junk";
        assert (getSystemMessages().isFileOfInterest(interesting));
        assert (!getSystemMessages().isFileOfInterest(notInteresting));
    }
}
{'fraction_non_alphanumeric': 0.09652755654667092, 'fraction_numerical': 0.011787193373685887, 'mean_word_length': 3.693572496263079, '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': '3749503', 'n_tokens_mistral': 869, 'n_tokens_neox': 819, 'n_words': 162}