@@ -0,0 +1,1931 @@
+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 PredicateWithThrown.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 PredicateWithThrown_OfLongTddTest %7B%0D%0A%0D%0A    /**%0D%0A     * long %E5%80%A4%E3%82%92 int %E5%9E%8B%E3%81%AB%E3%82%AD%E3%83%A3%E3%82%B9%E3%83%88%E3%81%99%E3%82%8B.%0D%0A     *%0D%0A     * @param number%0D%0A     *            %E3%82%AD%E3%83%A3%E3%82%B9%E3%83%88%E5%85%83 long %E5%80%A4.%0D%0A     * @return %E3%82%AD%E3%83%A3%E3%82%B9%E3%83%88%E5%BE%8C%E3%81%AE int %E5%80%A4.%0D%0A     * @throws ClassCastException%0D%0A     *             %E3%82%AD%E3%83%A3%E3%82%B9%E3%83%88%E3%81%AE%E5%89%8D%E5%BE%8C%E3%81%A7%E5%80%A4%E3%81%8C%E7%95%B0%E3%81%AA%E3%82%8B%E5%A0%B4%E5%90%88.%0D%0A     */%0D%0A    static int cast(long number) %7B%0D%0A        int intNumber = (int) number;%0D%0A        if ((long) intNumber == number) %7B%0D%0A            return intNumber;%0D%0A        %7D%0D%0A        throw new ClassCastException(%22fail to cast %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 #test(Long.MAX_VALUE)%0D%0A        this.thrown.expect(ClassCastException.class);%0D%0A        this.thrown.expectMessage(String.valueOf(Long.MAX_VALUE));%0D%0A%0D%0A        // #test%0D%0A        PredicateWithThrown.OfLong%3CClassCastException%3E instance = target -%3E cast(target) %3E 0;%0D%0A        assertThat(instance.test(1), is(true));%0D%0A%0D%0A        // #negate%0D%0A        assertThat(instance.negate().test(1), is(false));%0D%0A%0D%0A        // #and%0D%0A        assertThat(instance.and(target -%3E target %3C 0).test(1), is(false));%0D%0A%0D%0A        // #andPredicate%0D%0A        assertThat(instance.andPredicate(target -%3E target %3C 0).test(1), is(false));%0D%0A%0D%0A        // #or%0D%0A        assertThat(instance.or(target -%3E target %3C 0).test(1), is(true));%0D%0A%0D%0A        // #orPredicate%0D%0A        assertThat(instance.orPredicate(target -%3E target %3C 0).test(1), is(true));%0D%0A%0D%0A        // #toPredicate%0D%0A        assertThat(instance.toPredicate().test(1), is(true));%0D%0A%0D%0A        // #test%0D%0A        instance.toPredicate().test(Long.MAX_VALUE);%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

Add TDD of PredicateWithThrown.OfLong