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