@Test(expected = IllegalArgumentException.class)
public void testInvalidGenericType() throws NoSuchMethodException {

    ArrayList<String> al = new ArrayList<String>();
    Method addMethod = al.getClass().getMethod("add", Object.class);
    final Type type = addMethod.getGenericParameterTypes()[0];
    new GenericType(type);
}