### Question:
Algorithm { static <E, Ite extends Iterable<E>> Ite removeNull(Ite list) { return removeIf(list, new Predicate<E>() { @Override public boolean test(E e) { return Objects.isNull(e); } }); }  static ArrayList<E> findAll(Ite input, Predicate<E> predicate);  }### Answer:
@Test public void testRemoveNullWithEmptyIterable() { ArrayList<Boolean> list = new ArrayList<Boolean>(); removeNull(list); assertThat("The list should remain empty", list.size(), is(0)); assertThat("The list should remain the same", list, is(new ArrayList<Boolean>())); }
@Test public void testRemoveNullWithNonEmptyIterable() { List<Boolean> list = new ArrayList<Boolean>(Arrays.asList(Boolean.TRUE, null, Boolean.FALSE)); removeNull(list); assertThat("The list should have 2 elements remaining", list.size(), is(2)); assertThat("The list should remain the same", list, everyItem(is(notNullValue(Boolean.class)))); }