ProducesAnnotationHandler extends StringBasedAnnotationHandler<Produces> { @Override public void handleInterfaceAnnotation(Produces annotation, InterfaceConfigBuilder builder) { builder.setMethodsProduces(ph(annotation.value())); } ProducesAnnotationHandler(CRestConfig crestConfig); @Override void handleInterfaceAnnotation(Produces annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(Produces annotation, MethodConfigBuilder builder);  }
@Test public void handleInterfaceAnnotationShouldSetParamsProduces() throws Exception { when(mockAnnotation.value()).thenReturn("a"); toTest.handleInterfaceAnnotation(mockAnnotation, mockInterfaceConfigBuilder); verify(mockAnnotation).value(); verify(mockInterfaceConfigBuilder).setMethodsProduces("a"); }
@Test public void handleInterfaceAnnotationShouldMergePlaceholdersAndSetParamsProduces() throws Exception { when(mockAnnotation.value()).thenReturn(VAL_WITH_PH); toTest.handleInterfaceAnnotation(mockAnnotation, mockInterfaceConfigBuilder); verify(mockAnnotation).value(); verify(mockInterfaceConfigBuilder).setMethodsProduces(EXPECTED_MERGE_VAL); }