@Test(expected = IllegalStateException.class)
public void superclassIsNotAssignableFromSubclass() {

  try {
    GenericsUtil.fromGenericType(Long.class, Integer.class, 0);
  } catch (IllegalStateException e) {
    assertThat(e.getMessage()).contains("is no subclass of");
    throw e;
  }
}