### Question:
TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<Set<T>> setOf(Class<T> type) { return (TypeLiteral<Set<T>>)TypeLiteral.get(Types.setOf(type)); } private  TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<List<T>> listOf(Class<T> type); @SuppressWarnings("unchecked") static TypeLiteral<List<T>> listOf(TypeLiteral<T> type); @SuppressWarnings("unchecked") static TypeLiteral<Set<T>> setOf(Class<T> type); @SuppressWarnings("unchecked") static TypeLiteral<Set<T>> setOf(TypeLiteral<T> type); @SuppressWarnings("unchecked") static TypeLiteral<Map<K, V>> mapOf(Class<K> keyType, Class<V> valueType); @SuppressWarnings("unchecked") static TypeLiteral<Map<K, V>> mapOf(Class<K> keyType, TypeLiteral<V> valueType); @SuppressWarnings("unchecked") static TypeLiteral<Map<K, V>> mapOf(TypeLiteral<K> keyType, Class<V> valueType); @SuppressWarnings("unchecked") static TypeLiteral<Map<K, V>> mapOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType); @SuppressWarnings("unchecked") static TypeLiteral<Provider<T>> providerOf(Class<T> type); @SuppressWarnings("unchecked") static TypeLiteral<Provider<T>> providerOf(TypeLiteral<T> type);  }### Answer:
@Test public void testSetOf() { assertThat(TypeLiterals.setOf(String.class), equalTo(new TypeLiteral<Set<String>>() { })); assertThat(TypeLiterals.setOf(new TypeLiteral<Class<?>>() { }), equalTo(new TypeLiteral<Set<Class<?>>>() { })); }