@Test public void handleMethodsAnnotationShouldSetEntityWriter() throws Exception { when(mockAnnotation.value()).thenReturn((Class)UrlEncodedFormEntityWriter.class); toTest.handleMethodAnnotation(mockAnnotation, mockMethodConfigBuilder); verify(mockAnnotation).value(); verify(mockMethodConfigBuilder).setEntityWriter(UrlEncodedFormEntityWriter.class); }
@Override public void handleMethodAnnotation(EntityWriter annotation, MethodConfigBuilder builder) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException { builder.setEntityWriter(annotation.value()); }
EntityWriterAnnotationHandler extends NoOpAnnotationHandler<EntityWriter> { @Override public void handleMethodAnnotation(EntityWriter annotation, MethodConfigBuilder builder) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException { builder.setEntityWriter(annotation.value()); } }
EntityWriterAnnotationHandler extends NoOpAnnotationHandler<EntityWriter> { @Override public void handleMethodAnnotation(EntityWriter annotation, MethodConfigBuilder builder) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException { builder.setEntityWriter(annotation.value()); }  }
EntityWriterAnnotationHandler extends NoOpAnnotationHandler<EntityWriter> { @Override public void handleMethodAnnotation(EntityWriter annotation, MethodConfigBuilder builder) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException { builder.setEntityWriter(annotation.value()); }  @Override void handleInterfaceAnnotation(EntityWriter annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(EntityWriter annotation, MethodConfigBuilder builder); }
EntityWriterAnnotationHandler extends NoOpAnnotationHandler<EntityWriter> { @Override public void handleMethodAnnotation(EntityWriter annotation, MethodConfigBuilder builder) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException { builder.setEntityWriter(annotation.value()); }  @Override void handleInterfaceAnnotation(EntityWriter annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(EntityWriter annotation, MethodConfigBuilder builder);  }