@Test public void handleMethodsAnnotationShouldSetErrorHandler() throws Exception { when(mockAnnotation.value()).thenReturn((Class)ErrorDelegatorHandler.class); toTest.handleMethodAnnotation(mockAnnotation, mockMethodConfigBuilder); verify(mockAnnotation).value(); verify(mockMethodConfigBuilder).setErrorHandler(ErrorDelegatorHandler.class); }
@Override public void handleMethodAnnotation(ErrorHandler annotation, MethodConfigBuilder builder) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException, InstantiationException { builder.setErrorHandler(annotation.value()); }
ErrorHandlerAnnotationHandler extends NoOpAnnotationHandler<ErrorHandler> { @Override public void handleMethodAnnotation(ErrorHandler annotation, MethodConfigBuilder builder) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException, InstantiationException { builder.setErrorHandler(annotation.value()); } }
ErrorHandlerAnnotationHandler extends NoOpAnnotationHandler<ErrorHandler> { @Override public void handleMethodAnnotation(ErrorHandler annotation, MethodConfigBuilder builder) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException, InstantiationException { builder.setErrorHandler(annotation.value()); }  }
ErrorHandlerAnnotationHandler extends NoOpAnnotationHandler<ErrorHandler> { @Override public void handleMethodAnnotation(ErrorHandler annotation, MethodConfigBuilder builder) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException, InstantiationException { builder.setErrorHandler(annotation.value()); }  @Override void handleInterfaceAnnotation(ErrorHandler annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(ErrorHandler annotation, MethodConfigBuilder builder); }
ErrorHandlerAnnotationHandler extends NoOpAnnotationHandler<ErrorHandler> { @Override public void handleMethodAnnotation(ErrorHandler annotation, MethodConfigBuilder builder) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException, InstantiationException { builder.setErrorHandler(annotation.value()); }  @Override void handleInterfaceAnnotation(ErrorHandler annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(ErrorHandler annotation, MethodConfigBuilder builder);  }