### Question:
TypeRef { public static TypeRef<?> from(Type type) { return new ExplicitTypeRef<>(type); } protected  TypeRef(); private  TypeRef(Type type); final Type type(); @SuppressWarnings("unchecked") final Class<? super T> rawType(); @SuppressWarnings("unchecked") final Class<T> exactRawType(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString(); static TypeRef<?> from(Type type); static TypeRef<U> from(Class<U> rawType);  }### Answer:
@Test void from_nonstandardTypeSpecialization() { assertIllegalArg(() -> TypeRef.from(new Type() {})); }
@Test void from_parameterizedTypeNotReturningValidRawType() { var fakeParameterizedType = new ParameterizedType() { @Override public Type[] getActualTypeArguments() { return new Type[] { Object.class }; } @Override public Type getRawType() { return new Type() {}; } @Override public Type getOwnerType() { return null; } }; assertIllegalArg(() -> TypeRef.from(fakeParameterizedType)); }