### Question:
JandexUtil { public static List<Type> resolveTypeParameters(DotName input, DotName target, IndexView index) { final ClassInfo inputClassInfo = fetchFromIndex(input, index); Type startingType = getType(inputClassInfo, index); final List<Type> result = findParametersRecursively(startingType, target, new HashSet<>(), index); if (result == null) { return Collections.emptyList(); } return result; } private  JandexUtil(); static List<Type> resolveTypeParameters(DotName input, DotName target, IndexView index); static ClassInfo getEnclosingClass(AnnotationInstance annotationInstance); static boolean isSubclassOf(IndexView index, ClassInfo info, DotName parentName); @SuppressWarnings("incomplete-switch") static String getBoxedTypeName(Type type); final static DotName DOTNAME_OBJECT; }### Answer:
@Test public void testInterfaceNotInHierarchy() { final Index index = index(Single.class, SingleImpl.class, Multiple.class); final DotName impl = DotName.createSimple(SingleImpl.class.getName()); final List<Type> result = JandexUtil.resolveTypeParameters(impl, MULTIPLE, index); assertThat(result).isEmpty(); }
@Test public void testAbstractSingle() { final Index index = index(Single.class, AbstractSingle.class); final DotName impl = DotName.createSimple(AbstractSingle.class.getName()); List<Type> ret = JandexUtil.resolveTypeParameters(impl, SIMPLE, index); assertThat(ret).hasSize(1).allMatch(t -> t.kind() == Kind.TYPE_VARIABLE && t.asTypeVariable().identifier().equals("S")); }