@Test public void resolvesNestedInheritedTypeParameters() { TypeInformation<SecondExtension> information = ClassTypeInformation.from(SecondExtension.class); TypeInformation<?> superTypeInformation = information.getSuperTypeInformation(Base.class); List<TypeInformation<?>> parameters = superTypeInformation.getTypeArguments(); assertThat(parameters, hasSize(1)); assertThat(parameters.get(0).getType(), is((Object) String.class)); }
@Test public void resolvesTypeParametersCorrectly() { TypeInformation<ConcreteType> information = ClassTypeInformation.from(ConcreteType.class); TypeInformation<?> superTypeInformation = information.getSuperTypeInformation(GenericType.class); List<TypeInformation<?>> parameters = superTypeInformation.getTypeArguments(); assertThat(parameters, hasSize(2)); assertThat(parameters.get(0).getType(), is((Object) String.class)); assertThat(parameters.get(1).getType(), is((Object) Object.class)); }