@@ -0,0 +1,1882 @@
+package sp.util.function;%0D%0A%0D%0Aimport static org.hamcrest.CoreMatchers.*;%0D%0Aimport static org.junit.Assert.*;%0D%0A%0D%0Aimport org.junit.Rule;%0D%0Aimport org.junit.Test;%0D%0Aimport org.junit.rules.ExpectedException;%0D%0A%0D%0A/**%0D%0A * %7B@link FunctionWithThrown.OfLong%7D %E3%81%AE%E3%83%86%E3%82%B9%E3%83%88%E9%A7%86%E5%8B%95%E9%96%8B%E7%99%BA.%0D%0A *%0D%0A * @author Se-foo%0D%0A * @since 0.1%0D%0A */%0D%0Apublic class FunctionWithThrown_OfLongTddTest %7B%0D%0A%0D%0A    /**%0D%0A     * long %E5%80%A4%E3%81%8C 0 %E4%BB%A5%E4%B8%8A%E3%81%A7%E3%81%82%E3%82%8B%E3%81%93%E3%81%A8%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%99%E3%82%8B.%0D%0A     *%0D%0A     * @param number%0D%0A     *            %E7%A2%BA%E8%AA%8D%E5%AF%BE%E8%B1%A1.%0D%0A     * @return %E7%A2%BA%E8%AA%8D%E5%AF%BE%E8%B1%A1.%0D%0A     * @throws IllegalArgumentException%0D%0A     *             %E7%A2%BA%E8%AA%8D%E5%AF%BE%E8%B1%A1%E3%81%8C 0 %E6%9C%AA%E6%BA%80%E3%81%AE%E5%A0%B4%E5%90%88.%0D%0A     */%0D%0A    static long notNegative(long number) %7B%0D%0A        long abs = Math.abs(number);%0D%0A        if (abs == number) %7B%0D%0A            return number;%0D%0A        %7D%0D%0A        throw new IllegalArgumentException(%22fail to abs %22 + number + %22.%22);%0D%0A    %7D%0D%0A%0D%0A    @Rule%0D%0A    public ExpectedException thrown = ExpectedException.none();%0D%0A%0D%0A    @Test%0D%0A    public void test() %7B%0D%0A%0D%0A        // Check exception from #apply(%22test%22)%0D%0A        this.thrown.expect(IllegalArgumentException.class);%0D%0A        this.thrown.expectMessage(%22-100%22);%0D%0A%0D%0A        // #apply%0D%0A        FunctionWithThrown.OfLong%3CIllegalArgumentException%3E instance = target -%3E notNegative(target);%0D%0A        assertThat(instance.apply(100L), is(100L));%0D%0A%0D%0A        // #compose%0D%0A        assertThat(instance.compose(target -%3E target * -1).apply(-100L), is(100L));%0D%0A%0D%0A        // #composeFunction%0D%0A        assertThat(instance.composeFunction(target -%3E target * -1).apply(-100L), is(100L));%0D%0A%0D%0A        // #andThen%0D%0A        assertThat(instance.andThen(target -%3E target * -1).apply(100L), is(-100L));%0D%0A%0D%0A        // #andThenFunction%0D%0A        assertThat(instance.andThenFunction(target -%3E target * -1).apply(100L), is(-100L));%0D%0A%0D%0A        // #toFunction%0D%0A        assertThat(instance.toFunction().applyAsLong(100L), is(100L));%0D%0A%0D%0A        // #apply%0D%0A        instance.toFunction().applyAsLong(-100L);%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

Add TDD of FunctionWithThrown.OfLong