One option I might consider here is adding a custom matcher that can compares the raw class type. You can then inline these constants (more readable IMO) and keep the `@SuppressWarnings("rawtypes")` only inside your matcher.

I haven't implemented this but I think it would work. You could either add a static method here that creates an anonymous matcher or (if the code ends up too large) create a top-level class for the matcher, that has its own static method to create instances of the matcher. You can then statically import this and have nice clean assertions throughout your test.