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