ListSeparatorAnnotationHandler extends StringBasedAnnotationHandler<ListSeparator> { @Override public void handleMethodAnnotation(ListSeparator annotation, MethodConfigBuilder builder) { builder.setParamsListSeparator(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 handleMethodsAnnotationShouldSetListSeparator() throws Exception { when(mockAnnotation.value()).thenReturn("a"); toTest.handleMethodAnnotation(mockAnnotation, mockMethodConfigBuilder); verify(mockAnnotation).value(); verify(mockMethodConfigBuilder).setParamsListSeparator("a"); }
@Test public void handleMethodsAnnotationShouldMergePlaceholdersAndSetListSeparator() throws Exception { when(mockAnnotation.value()).thenReturn(VAL_WITH_PH); toTest.handleMethodAnnotation(mockAnnotation, mockMethodConfigBuilder); verify(mockAnnotation).value(); verify(mockMethodConfigBuilder).setParamsListSeparator(EXPECTED_MERGE_VAL); }