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