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