<commit_before>package com.github.dreamhead.moco.util;

import org.junit.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;

public class IterablesTest {
    @Test
    public void should_get_tail() {
        assertThat(Iterables.tail(new Integer[]{1, 2}), is(new Integer[] {2}));
        assertThat(Iterables.tail(new Integer[1]), is(new Integer[0]));
        assertThat(Iterables.tail(new Integer[0]), is(new Integer[0]));
    }
}<commit_msg>added test for isNullOrEmpty in iterables<commit_after>package com.github.dreamhead.moco.util;

import org.junit.Test;

import java.util.Arrays;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;

public class IterablesTest {
    @Test
    public void should_get_tail() {
        assertThat(Iterables.tail(new Integer[]{1, 2}), is(new Integer[] {2}));
        assertThat(Iterables.tail(new Integer[1]), is(new Integer[0]));
        assertThat(Iterables.tail(new Integer[0]), is(new Integer[0]));
    }

    @Test
    public void should_be_null_or_empty() {
        assertThat(Iterables.isNullOrEmpty(null), is(true));
        assertThat(Iterables.isNullOrEmpty(Arrays.asList()), is(true));
        assertThat(Iterables.isNullOrEmpty(Arrays.asList(1)), is(false));
    }
}
{'fraction_non_alphanumeric': 0.13774733637747336, 'fraction_numerical': 0.01141552511415525, 'mean_word_length': 4.45643153526971, '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': '1117963', 'n_tokens_mistral': 420, 'n_tokens_neox': 425, 'n_words': 79}