### Question:
HasSuperClassMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { if (target.isInterface()) { return matcher.matches(TypeDescription.Generic.OBJECT); } for (TypeDefinition typeDefinition : target) { if (matcher.matches(typeDefinition.asGenericType())) { return true; } } return false; } HasSuperClassMatcher(ElementMatcher<? super TypeDescription.Generic> matcher); boolean matches(T target); @Override String toString();  }### Answer:
@Test public void testMatchSuperClass() throws Exception { when(typeMatcher.matches(superType)).thenReturn(true); assertThat(new HasSuperClassMatcher<TypeDescription>(typeMatcher).matches(typeDescription), is(true)); }
@Test public void testMatchNotSuperInterface() throws Exception { when(typeMatcher.matches(interfaceType)).thenReturn(true); assertThat(new HasSuperClassMatcher<TypeDescription>(typeMatcher).matches(typeDescription), is(false)); }
@Test public void testMatchSuperInterfaceImplicit() throws Exception { when(typeMatcher.matches(implicitInterfaceType)).thenReturn(true); assertThat(new HasSuperClassMatcher<TypeDescription>(typeMatcher).matches(typeDescription), is(false)); }
@Test public void testNoMatch() throws Exception { assertThat(new HasSuperClassMatcher<TypeDescription>(typeMatcher).matches(typeDescription), is(false)); }