DeserializerAnnotationHandler extends NoOpAnnotationHandler<Deserializer> { @Override public void handleMethodAnnotation(Deserializer annotation, MethodConfigBuilder builder) throws Exception { builder.setDeserializer(annotation.value()); }  @Override void handleInterfaceAnnotation(Deserializer annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(Deserializer annotation, MethodConfigBuilder builder);  }
@Test public void handleMethodsAnnotationShouldSetDeserializer() throws Exception { when(mockAnnotation.value()).thenReturn((Class)StringDeserializer.class); toTest.handleMethodAnnotation(mockAnnotation, mockMethodConfigBuilder); verify(mockAnnotation).value(); verify(mockMethodConfigBuilder).setDeserializer(StringDeserializer.class); }