### Question:
TypeLiteral { public static <K, V> TypeLiteral<Map<K, V>> mapOf(Class<? extends K> keyType, Class<? extends V> valueType) { return new TypeLiteral<>(Map.class, keyType, valueType); } @SuppressWarnings("unchecked") protected  TypeLiteral(); @SuppressWarnings("unchecked") private  TypeLiteral(Type type); private  TypeLiteral(Class<? super T> type, String... argumentTypes); private  TypeLiteral(Class<? super T> type, Type... argumentsType); static TypeLiteral<T> of(Class<T> type); static TypeLiteral<T> of(Type type); static TypeLiteral<T> of(Class<T> rawType, Type... parameters); static TypeLiteral<List<T>> listOf(Class<? extends T> type); static TypeLiteral<List<T>> listOf(TypeLiteral<? extends T> type); static TypeLiteral<Set<T>> setOf(Class<? extends T> valueType); static TypeLiteral<Set<T>> setOf(TypeLiteral<? extends T> valueType); static TypeLiteral<Map<K, V>> mapOf(Class<? extends K> keyType, Class<? extends V> valueType); static TypeLiteral<Map<K, V>> mapOf(TypeLiteral<? extends K> keyType, TypeLiteral<? extends V> valueType); static TypeLiteral<Optional<T>> optionalOf(Class<? extends T> type); static TypeLiteral<Optional<T>> optionalOf(TypeLiteral<? extends T> type); Class<? super T> getRawType(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testNestedGenerics() { TypeLiteral<Map<String, List<? extends Number>>> typeLiteral1 = new TypeLiteral<Map<String, List<? extends Number>>>(){}; TypeLiteral<Map<String, List<? extends Number>>> typeLiteral2 = TypeLiteral.mapOf(new TypeLiteral<String>(){}, new TypeLiteral<List<? extends Number>>(){}); TypeLiteral<Map<String, List<? extends Integer>>> typeLiteral3 = new TypeLiteral<Map<String, List<? extends Integer>>>(){}; TypeLiteral<Map<String, List<? extends Integer>>> typeLiteral4 = TypeLiteral.mapOf(new TypeLiteral<String>(){}, new TypeLiteral<List<? extends Integer>>(){}); assertEquals(typeLiteral1, typeLiteral2); assertEquals(typeLiteral3, typeLiteral4); assertNotEquals(typeLiteral1, typeLiteral3); assertNotEquals(typeLiteral1, typeLiteral4); assertNotEquals(typeLiteral2, typeLiteral3); assertNotEquals(typeLiteral2, typeLiteral4); }