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