@Test public void handleMethodAnnotationShouldMergePlaceholdersAndFillProducesWithFirstAnnotationValue() throws Exception { when(mockAnnotation.value()).thenReturn(new String[]{VAL_WITH_PH + "a", VAL_WITH_PH + "b"}); when(mockMethodConfigBuilder.setProduces(EXPECTED_MERGE_VAL + "a")).thenReturn(mockMethodConfigBuilder); toTest.handleMethodAnnotation(mockAnnotation, mockMethodConfigBuilder); verify(mockAnnotation, times(2)).value(); verify(mockMethodConfigBuilder).setProduces(EXPECTED_MERGE_VAL + "a"); }
@Override public void handleMethodAnnotation(Consumes annotation, MethodConfigBuilder builder) { if(annotation.value().length >= 1) { builder.setProduces(ph(annotation.value()[0])); } }
ConsumesAnnotationHandler extends StringBasedAnnotationHandler<Consumes> { @Override public void handleMethodAnnotation(Consumes annotation, MethodConfigBuilder builder) { if(annotation.value().length >= 1) { builder.setProduces(ph(annotation.value()[0])); } } }
ConsumesAnnotationHandler extends StringBasedAnnotationHandler<Consumes> { @Override public void handleMethodAnnotation(Consumes annotation, MethodConfigBuilder builder) { if(annotation.value().length >= 1) { builder.setProduces(ph(annotation.value()[0])); } } ConsumesAnnotationHandler(CRestConfig crestConfig); }
ConsumesAnnotationHandler extends StringBasedAnnotationHandler<Consumes> { @Override public void handleMethodAnnotation(Consumes annotation, MethodConfigBuilder builder) { if(annotation.value().length >= 1) { builder.setProduces(ph(annotation.value()[0])); } } ConsumesAnnotationHandler(CRestConfig crestConfig); @Override void handleInterfaceAnnotation(Consumes annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(Consumes annotation, MethodConfigBuilder builder); }
ConsumesAnnotationHandler extends StringBasedAnnotationHandler<Consumes> { @Override public void handleMethodAnnotation(Consumes annotation, MethodConfigBuilder builder) { if(annotation.value().length >= 1) { builder.setProduces(ph(annotation.value()[0])); } } ConsumesAnnotationHandler(CRestConfig crestConfig); @Override void handleInterfaceAnnotation(Consumes annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(Consumes annotation, MethodConfigBuilder builder);  }