### Question:
Iterables { public static <T> Set<T> asSet(Iterable<? extends T> iterable) { return setFrom(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 shouldConvertTheSuppliedIterableToASet() throws Exception { Iterable<Integer> iterable = basicIterableOver(1, 2, 2, 3, 3, 3); Set<Integer> expectedSet = setWith(1, 2, 3); Set<Integer> actualSet = asSet(iterable); assertThat(actualSet, hasOnlyItemsInAnyOrder(expectedSet)); }
@Test(expected = NullPointerException.class) public void shouldThrowANullPointerExceptionIfIterablePassedToAsSetIsNull() throws Exception { asSet(null); }