<commit_before>package zeptodns.protocol.fluent;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import zeptodns.protocol.messages.Message;

@RunWith(JUnit4.class)
public class MessageBuilderTest {
    @Test
    public void thatMessageBuilderQueryIsValid() {
        Message message = MessageBuilder
                .begin()
                .asQuery()
                .end();

        // TODO
    }
}
<commit_msg>Test MessaeTypeStep<commit_after>package zeptodns.protocol.fluent;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import zeptodns.protocol.messages.Message;
import zeptodns.protocol.wire.FlagUtils;

import static org.junit.Assert.*;

@RunWith(JUnit4.class)
public class MessageBuilderTest {
    @Test
    public void thatMessageBuilderQueryIsValid() {
        Message message = MessageBuilder
                .begin()
                .asQuery()
                .end();

        assertEquals(FlagUtils.getQueryResponse(message.getHeaderSection().getFlags()), 0);
    }

    @Test
    public void thatMessageBuilderResponseIsValid() {
        Message message = MessageBuilder
                .begin()
                .asResponse()
                .end();

        assertEquals(FlagUtils.getQueryResponse(message.getHeaderSection().getFlags()), 1);
    }
}

{'fraction_non_alphanumeric': 0.10281065088757396, 'fraction_numerical': 0.004437869822485207, 'mean_word_length': 2.6370967741935485, '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': '6540109', 'n_tokens_mistral': 392, 'n_tokens_neox': 376, 'n_words': 69}