### Question:
ListOps { static <T, U> U foldRight(List<T> list, U initial, BiFunction<T, U, U> f) { throw new UnsupportedOperationException("Delete this statement and write your own implementation."); } private  ListOps();   }### Answer:
@Ignore("Remove to run test") @Test public void testFoldRightEmptyList() { assertEquals( new Double(2.0), ListOps.foldRight( Collections.<Double>emptyList(), 2.0, (x, y) -> x * y ) ); }
@Ignore("Remove to run test") @Test public void testFoldRightDirectionIndependentFunctionAppliedToNonEmptyList() { assertEquals( new Integer(15), ListOps.foldRight( Arrays.asList(1, 2, 3, 4), 5, (x, y) -> x + y ) ); }
@Ignore("Remove to run test") @Test public void testFoldRightDirectionDependentFunctionAppliedToNonEmptyList() { assertEquals( new Integer(2), ListOps.foldRight( Arrays.asList(2, 5), 5, (x, y) -> x / y ) ); }