### Question:
AnnotationTypeMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { return matcher.matches(target.getAnnotationType()); } AnnotationTypeMatcher(ElementMatcher<? super TypeDescription> matcher); boolean matches(T target); @Override String toString();  }### Answer:
@Test public void testMatch() throws Exception { when(typeMatcher.matches(annotationType)).thenReturn(true); assertThat(new AnnotationTypeMatcher<AnnotationDescription>(typeMatcher).matches(annotatedElement), is(true)); verify(typeMatcher).matches(annotationType); verifyNoMoreInteractions(typeMatcher); }
@Test public void testNoMatch() throws Exception { when(typeMatcher.matches(annotationType)).thenReturn(false); assertThat(new AnnotationTypeMatcher<AnnotationDescription>(typeMatcher).matches(annotatedElement), is(false)); verify(typeMatcher).matches(annotationType); verifyNoMoreInteractions(typeMatcher); }