class PrimitiveTypeUtils {

    public static Class<?> toWrapper(final TypeToken<?> primitiveTypeToken) {
        return toWrapper((Class<?>) primitiveTypeToken.getType());
    }

}

class PrimitiveTypeUtilsTest {

    @Test(expected = IllegalArgumentException.class)
    public void raiseArgumentErrorByNonPrimitiveType() {

        PrimitiveTypeUtils.toWrapper(Integer.class);
    }

}