@Test
public void testFoldRight() throws Exception {

    assertEquals (ACollectionHelper.foldRight (
                    Arrays.asList (1, 2, 3, 4, 5),
                    0, new AFunction2<Integer, Integer, Integer, Exception> () {
                        @Override
                        public Integer apply (Integer param1, Integer param2) throws Exception {
                            return param1 * 2 + param2;
                        }
                    }).intValue (),
                  ((((5 * 2 + 4) * 2 + 3) * 2 + 2) * 2 + 1)
    );
}