### Question:
QueryParamAnnotationHandler extends StringBasedAnnotationHandler<QueryParam> { @Override public void handleParameterAnnotation(QueryParam annotation, ParamConfigBuilder builder) { builder.setType(QUERY).setName(ph(annotation.value())); } QueryParamAnnotationHandler(CRestConfig crestConfig); @Override void handleParameterAnnotation(QueryParam annotation, ParamConfigBuilder builder);  }### Answer:
@Test public void handleParameterAnnotationShouldSetTypeAndName() throws Exception { when(mockParamConfigBuilder.setType(any(ParamType.class))).thenReturn(mockParamConfigBuilder); when(mockAnnotation.value()).thenReturn("a"); toTest.handleParameterAnnotation(mockAnnotation, mockParamConfigBuilder); verify(mockParamConfigBuilder).setType(ParamType.QUERY); verify(mockParamConfigBuilder).setName("a"); verify(mockAnnotation).value(); }
@Test public void handleParameterAnnotationShouldMergePlaceholdersAndSetTypeAndName() throws Exception { when(mockParamConfigBuilder.setType(any(ParamType.class))).thenReturn(mockParamConfigBuilder); when(mockAnnotation.value()).thenReturn(VAL_WITH_PH); toTest.handleParameterAnnotation(mockAnnotation, mockParamConfigBuilder); verify(mockParamConfigBuilder).setType(ParamType.QUERY); verify(mockParamConfigBuilder).setName(EXPECTED_MERGE_VAL); verify(mockAnnotation).value(); }