We can simplify this to
```java
@SuppressWarnings({"unchecked", "rawtypes"})
@Test(expected = InvalidTypesException.class)
public void testTypeErasureException() {
	TypeExtractor.getFlatMapReturnTypes(...);
}
```