    @Test
    @SuppressWarnings("unchecked")
    public void testMatch() throws Exception {

        when(typeDescription.getDeclaredMethods()).thenReturn((MethodList) methodList);
        when(methodMatcher.matches(methodList)).thenReturn(true);
        assertThat(new DeclaringMethodMatcher<TypeDescription>(methodMatcher).matches(typeDescription), is(true));
        verify(methodMatcher).matches(methodList);
        verifyNoMoreInteractions(methodMatcher);
        verify(typeDescription).getDeclaredMethods();
        verifyNoMoreInteractions(typeDescription);
    }