### Question:
GenericTypes { public static Class<?> getErasedType(Type type) { return GenericTypeReflector.erase(type); } private  GenericTypes(); static Class<?> getErasedType(Type type); static Optional<Type> findGenericParameter(Type type, Class<?> parameterizedSupertype); static Optional<Type> findGenericParameter(Type type, Class<?> parameterizedSupertype, int n); static Type resolveType(Type type, Type contextType); static boolean isArray(Type type); static Type arrayType(Type type); static Type resolveMapEntryType(Type mapType); static Type resolveMapEntryType(Type keyType, Type valueType); static Type parameterizeClass(Class<?> clazz, Type... arguments); static Type box(Type type);  }### Answer:
@Test public void getErasedTypeOfRaw() throws NoSuchMethodException { assertThat(GenericTypes.getErasedType(methodReturnType(Foo.class, "raw"))).isEqualTo(Foo.class); }
@Test public void getErasedTypeOfGeneric() throws NoSuchMethodException { assertThat(GenericTypes.getErasedType(methodReturnType(Foo.class, "generic"))).isEqualTo(Foo.class); }
@Test public void getErasedTypeOfNestedGeneric() throws NoSuchMethodException { assertThat(GenericTypes.getErasedType(methodReturnType(Foo.class, "nestedGeneric"))).isEqualTo(Foo.class); }