It seems a few problems were introduced with HSEARCH-3082, where we create an exception but forget to throw it.
Two things to do:
1. Throw the exception, obviously
2. Add a test for each such problem, because an untested feature is a non-existent feature.
I noticed the problem in org.hibernate.search.mapper.pojo.model.impl.AbstractPojoModelCompositeElement#createAccessor(java.lang.Class<T>), but there may be others.