RetryHandlerAnnotationHandler extends NoOpAnnotationHandler<RetryHandler> { @Override public void handleInterfaceAnnotation(RetryHandler annotation, InterfaceConfigBuilder builder) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException, InstantiationException { builder.setMethodsRetryHandler(annotation.value()); }  @Override void handleInterfaceAnnotation(RetryHandler annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(RetryHandler annotation, MethodConfigBuilder builder);  }
@Test public void handleInterfaceAnnotationShouldSetMethodsRetryHandler() throws Exception { when(mockAnnotation.value()).thenReturn((Class) MaxAttemptRetryHandler.class); toTest.handleInterfaceAnnotation(mockAnnotation, mockInterfaceConfigBuilder); verify(mockAnnotation).value(); verify(mockInterfaceConfigBuilder).setMethodsRetryHandler(MaxAttemptRetryHandler.class); }