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