ListSeparatorAnnotationHandler extends StringBasedAnnotationHandler<ListSeparator> { @Override public void handleParameterAnnotation(ListSeparator annotation, ParamConfigBuilder builder) { builder.setListSeparator(ph(annotation.value())); } ListSeparatorAnnotationHandler(CRestConfig crestConfig); @Override void handleInterfaceAnnotation(ListSeparator annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(ListSeparator annotation, MethodConfigBuilder builder); @Override void handleParameterAnnotation(ListSeparator annotation, ParamConfigBuilder builder);  }
@Test public void handleParametersAnnotationShouldSetListSeparator() throws Exception { when(mockAnnotation.value()).thenReturn("a"); toTest.handleParameterAnnotation(mockAnnotation, mockParamConfigBuilder); verify(mockAnnotation).value(); verify(mockParamConfigBuilder).setListSeparator("a"); }
@Test public void handleParametersAnnotationShouldMergePlaceholdersAndSetListSeparator() throws Exception { when(mockAnnotation.value()).thenReturn(VAL_WITH_PH); toTest.handleParameterAnnotation(mockAnnotation, mockParamConfigBuilder); verify(mockAnnotation).value(); verify(mockParamConfigBuilder).setListSeparator(EXPECTED_MERGE_VAL); }