<commit_before>package io.searchbox.core;

import com.google.gson.Gson;
import com.google.gson.JsonParser;
import org.json.JSONException;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;

import java.util.Arrays;
import java.util.Map;

import static org.junit.Assert.*;

/**
 * @author <NAME>
 */
public class MultiSearchTest {

    @Test
    public void singleMultiSearchWithoutIndex() throws JSONException {
        String expectedData = " {\"index\" : \"_all\"}\n" +<commit_msg>Add test for content type of MultiSearch<commit_after>package io.searchbox.core;

import com.google.gson.Gson;
import com.google.gson.JsonParser;
import org.json.JSONException;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;

import java.util.Arrays;
import java.util.Map;

import static org.junit.Assert.*;

/**
 * @author <NAME>
 */
public class MultiSearchTest {

    @Test
    public void multiSearchHasCorrectContentType() throws JSONException {
        Search search = new Search.Builder("").build();
        MultiSearch multiSearch = new MultiSearch.Builder(search).build();

        assertEquals("POST", multiSearch.getRestMethodName());
        assertEquals("/_msearch", multiSearch.getURI());
        assertEquals("application/x-ndjson", multiSearch.getHeader("Content-Type"));
    }

    @Test
    public void singleMultiSearchWithoutIndex() throws JSONException {
        String expectedData = " {\"index\" : \"_all\"}\n" +
{'fraction_non_alphanumeric': 0.1276595744680851, 'fraction_numerical': 0.0, 'mean_word_length': 4.133802816901408, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3108738', 'n_tokens_mistral': 428, 'n_tokens_neox': 424, 'n_words': 94}