QueryParamsAnnotationHandler extends NoOpAnnotationHandler<QueryParams> { @Override public void handleMethodAnnotation(QueryParams annotation, MethodConfigBuilder builder) { for(QueryParam paramAnnotation : annotation.value()){ handler.handleMethodAnnotation(paramAnnotation, builder); } } QueryParamsAnnotationHandler(QueryParamAnnotationHandler handler);  QueryParamsAnnotationHandler(CRestConfig crestConfig); @Override void handleInterfaceAnnotation(QueryParams annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(QueryParams annotation, MethodConfigBuilder builder);  }
@Test public void handleMethodAnnotationShouldDelegateToInnerHandlerForEachAnnotations() throws Exception { when(mockAnnotation.value()).thenReturn(mockAnnotations); toTest.handleMethodAnnotation(mockAnnotation, mockMethodConfigBuilder); verify(mockQueryParamAnnotationHandler).handleMethodAnnotation(mockAnnotations[0], mockMethodConfigBuilder); verify(mockQueryParamAnnotationHandler).handleMethodAnnotation(mockAnnotations[1], mockMethodConfigBuilder); verify(mockAnnotation).value(); }