package util.list;

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

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import junit.framework.TestCase;

import org.junit.Test;

/**
 * {@link ListEx} is test class.
 * 
 * @since v0.1
 */
public class TestListEx extends TestCase {
    private static final List<String> LIST = new ArrayList<>(Arrays.asList(
            "hoge",
            "fuga",
            "piyo",
            null,
            ""));

    @Test
    public void test_countList1() {
        assertThat(ListEx.countList(LIST, null, false), is(5));
        assertThat(ListEx.countList(LIST, null, true), is(4));
        assertThat(ListEx.countList(LIST, Arrays.asList("hoge"), false), is(4));
        assertThat(ListEx.countList(LIST, Arrays.asList("hoge", "fuga"), false), is(3));
        assertThat(ListEx.countList(LIST, Arrays.asList("hoge", "fuga", "piyo"), true), is(1));
        assertThat(
                ListEx.countList(LIST, Arrays.asList("hoge", "fuga", "piyo", ""), true),
                is(0));
        assertThat(
                ListEx.countList(LIST, Arrays.asList("hoge", "fuga", "piyo", null), false),
                is(1));
        assertThat(ListEx.countList(LIST, Arrays.asList(""), false), is(4));
        assertThat(ListEx.countList(LIST, Arrays.asList(""), true), is(3));
        assertThat(ListEx.countList(LIST, Arrays.asList("", null), false), is(3));
        assertThat(ListEx.countList(null, null, false), is(0));
    }

    @Test
    public void test_countList2() {
        assertThat(ListEx.countList(LIST, false), is(5));
        assertThat(ListEx.countList(LIST, true), is(4));
    }

    @Test
    public void test_toNotNullElementsList() {
        assertThat(
                ListEx.toNotNullElementsList(LIST),
                is(Arrays.asList("hoge", "fuga", "piyo", "")));
    }

    @Test
    public void test_toNotNullList() {
        assertThat(ListEx.toNotNullList(LIST), is(LIST));
        assertThat(ListEx.toNotNullList(null), isA(List.class));
    }
}

@@ -602,18 +602,21 @@
 est_
-countList1
+size_excludes
 () %7B
@@ -638,33 +638,28 @@
 That(ListEx.
-countList
+size
 (LIST, null,
@@ -697,33 +697,28 @@
 That(ListEx.
-countList
+size
 (LIST, null,
@@ -755,33 +755,28 @@
 That(ListEx.
-countList
+size
 (LIST, Array
@@ -831,33 +831,28 @@
 That(ListEx.
-countList
+size
 (LIST, Array
@@ -915,33 +915,28 @@
 That(ListEx.
-countList
+size
 (LIST, Array
@@ -1023,33 +1023,28 @@
      ListEx.
-countList
+size
 (LIST, Array
@@ -1151,33 +1151,28 @@
      ListEx.
-countList
+size
 (LIST, Array
@@ -1265,33 +1265,28 @@
 That(ListEx.
-countList
+size
 (LIST, Array
@@ -1337,33 +1337,28 @@
 That(ListEx.
-countList
+size
 (LIST, Array
@@ -1408,33 +1408,28 @@
 That(ListEx.
-countList
+size
 (LIST, Array
@@ -1490,25 +1490,20 @@
 (ListEx.
-countList
+size
 (null, n
@@ -1565,18 +1565,12 @@
 est_
-countList2
+size
 () %7B
@@ -1592,33 +1592,28 @@
 That(ListEx.
-countList
+size
 (LIST, false
@@ -1653,17 +1653,12 @@
 tEx.
-countList
+size
 (LIS

Update TestListEx.java