EndPointAnnotationHandler extends StringBasedAnnotationHandler<EndPoint> { @Override public void handleMethodAnnotation(EndPoint annotation, MethodConfigBuilder builder) throws Exception { builder.setEndPoint(ph(annotation.value())); } EndPointAnnotationHandler(CRestConfig crestConfig); @Override void handleInterfaceAnnotation(EndPoint annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(EndPoint annotation, MethodConfigBuilder builder);  }
@Test public void handleMethodsAnnotationShouldSetEndPoint() throws Exception { when(mockAnnotation.value()).thenReturn("a"); toTest.handleMethodAnnotation(mockAnnotation, mockMethodConfigBuilder); verify(mockAnnotation).value(); verify(mockMethodConfigBuilder).setEndPoint("a"); }
@Test public void handleMethodsAnnotationShouldMergePlaceholdersAndSetEndPoint() throws Exception { when(mockAnnotation.value()).thenReturn(VAL_WITH_PH); toTest.handleMethodAnnotation(mockAnnotation, mockMethodConfigBuilder); verify(mockAnnotation).value(); verify(mockMethodConfigBuilder).setEndPoint(EXPECTED_MERGE_VAL); }