### Question:
MoreElements implements Elements { public TypeParametersDef getTypeParametersDef(Parameterizable element) { assertNotNull(element); List<? extends TypeParameterElement> typeParameters = element.getTypeParameters(); List<String> typeParameterNames = getTypeParameterNames(typeParameters); Iterator<String> values = typeParameterNames.iterator(); Iterator<? extends TypeParameterElement> keys = typeParameters.iterator(); LinkedHashMap<TypeParameterElement, String> map = new LinkedHashMap<>(); while (keys.hasNext() && values.hasNext()) { map.put(keys.next(), values.next()); } return new TypeParametersDef(map); } MoreElements(Context ctx, ProcessingEnvironment env); @Override PackageElement getPackageElement(CharSequence name); @Override TypeElement getTypeElement(CharSequence canonicalName); @Override Map<? extends ExecutableElement, ? extends AnnotationValue> getElementValuesWithDefaults(
      AnnotationMirror a); @Override String getDocComment(Element e); @Override boolean isDeprecated(Element e); @Override Name getBinaryName(TypeElement type); @Override PackageElement getPackageOf(Element type); @Override List<? extends Element> getAllMembers(TypeElement type); @Override List<? extends AnnotationMirror> getAllAnnotationMirrors(Element e); @Override boolean hides(Element hider, Element hidden); @Override boolean overrides(
      ExecutableElement overrider, ExecutableElement overridden, TypeElement type); @Override String getConstantExpression(Object value); @Override void printElements(Writer w, Element... elements); @Override Name getName(CharSequence cs); @Override boolean isFunctionalInterface(TypeElement type); String getParameterName(VariableElement variableElement); TypeElement toTypeElement(Element element); TypeParameterElement toTypeParameterElement(Element element); ExecutableType toExecutableType(Element element); TypeElement getTypeElementFromBinaryName(String binaryName); TypeElement getTypeElement(Class<?> clazz); AnnotationMirror getAnnotationMirror(
      Element element, Class<? extends Annotation> annotationClass); AnnotationMirror getAnnotationMirror(Element element, String annotationClassName); ExecutableElement getNoArgConstructor(TypeElement typeElement); Map<String, AnnotationValue> getValuesWithoutDefaults(AnnotationMirror annotationMirror); Map<String, AnnotationValue> getValuesWithDefaults(AnnotationMirror annotationMirror); TypeParametersDef getTypeParametersDef(Parameterizable element); VariableElement getSingleParameterOfRecordConstructor(TypeElement record); boolean isVirtualDefaultMethod(TypeElement typeElement, ExecutableElement methodElement);  }### Answer:
@Test void getTypeParametersDef() { addProcessor( new TestProcessor() { @Override protected void run() { TypeElement typeElement = ctx.getMoreElements().getTypeElement(ParameterizedClass.class); TypeParametersDef def = ctx.getMoreElements().getTypeParametersDef(typeElement); assertIterableEquals(Arrays.asList("T", "U"), def.getTypeVariables()); assertIterableEquals( Arrays.asList("T", "U extends java.lang.Number"), def.getTypeParameters()); } }); }