### Question:
TypeRef { @SuppressWarnings("unchecked") public final Class<T> exactRawType() { if (!(type instanceof Class<?>)) { throw new UnsupportedOperationException("<" + type + "> is not a raw type"); } return (Class<T>) 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 exactRawType_fromRawType() { var ref = new TypeRef<String>() {}; assertEquals(String.class, ref.exactRawType()); }
@Test <T> void exactRawType_notRaw() { assertThrows(UnsupportedOperationException.class, () -> new TypeRef<T>() {}.exactRawType()); assertThrows(UnsupportedOperationException.class, () -> new TypeRef<List<String>>() {}.exactRawType()); }