class FJIterate {

    public static <T> Collection<T> select(
            Iterable<T> iterable,
            Predicate<? super T> predicate)
    {
        return FJIterate.select(iterable, predicate, false);
    }

}

class FJIterateTest {

    private static final Procedure<Integer> EXCEPTION_PROCEDURE;
    private static final ObjectIntProcedure<Integer> EXCEPTION_OBJECT_INT_PROCEDURE;
    private static final Function<Integer, Collection<String>> INT_TO_TWO_STRINGS;
    private static final Function0<AtomicInteger> ATOMIC_INTEGER_NEW;
    private static final Function0<Integer> INTEGER_NEW;
    private static final Function<Integer, String> EVEN_OR_ODD;
    private ImmutableList<RichIterable<Integer>> iterables;
    private final ForkJoinPool executor;

    @Test
    public void selectSortedSet()
    {

        RichIterable<Integer> iterable = Interval.oneTo(200).toSortedSet();
        Collection<Integer> actual1 = FJIterate.select(iterable, Predicates.greaterThan(100));
        Collection<Integer> actual2 = FJIterate.select(iterable, Predicates.greaterThan(100), true);
        RichIterable<Integer> expected = iterable.select(Predicates.greaterThan(100));
        Assert.assertSame(expected.getClass(), actual1.getClass());
        Assert.assertSame(expected.getClass(), actual2.getClass());
        Assert.assertEquals(expected.getClass().getSimpleName() + '/' + actual1.getClass().getSimpleName(), expected, actual1);
        Assert.assertEquals(expected.getClass().getSimpleName() + '/' + actual2.getClass().getSimpleName(), expected, actual2);
    }

}