Test Class<T> instantiation as attribute