### Question:
Iterables { public static <T> Collection<T> materialize(Iterable<? extends T> iterable) { return collectionFrom(iterable); } private  Iterables(); static Iterable<T> concat(Iterable<? extends Iterable<? extends T>> iterables); static List<T> asList(Iterable<? extends T> iterable); static Set<T> asSet(Iterable<? extends T> iterable); static Multiset<T> asMultiset(Iterable<? extends T> iterable); static Collection<T> materialize(Iterable<? extends T> iterable); static Iterable<T> empty();  }### Answer:
@Test public void shouldMaterialiseTheSuppliedIterableToACollection() throws Exception { Iterable<Integer> iterable = basicIterableOver(1, 2, 2, 3, 3, 3); Collection<Integer> expectedCollection = collectionWith(1, 2, 2, 3, 3, 3); Collection<Integer> actualCollection = materialize(iterable); assertThat(actualCollection, hasOnlyItemsInOrder(expectedCollection)); }
@Test(expected = NullPointerException.class) public void shouldThrowANullPointerExceptionIfIterablePassedToMaterializeIsNull() throws Exception { materialize(null); }