ConnectionTimeoutAnnotationHandler extends NoOpAnnotationHandler<ConnectionTimeout> { @Override public void handleMethodAnnotation(ConnectionTimeout annotation, MethodConfigBuilder builder) { builder.setConnectionTimeout(annotation.value()); }  @Override void handleInterfaceAnnotation(ConnectionTimeout annotation, InterfaceConfigBuilder builder); @Override void handleMethodAnnotation(ConnectionTimeout annotation, MethodConfigBuilder builder);  }
@Test public void handleMethodAnnotationShouldSetConnectionTimeout() throws Exception { when(mockAnnotation.value()).thenReturn(12); toTest.handleMethodAnnotation(mockAnnotation, mockMethodConfigBuilder); verify(mockAnnotation).value(); verify(mockMethodConfigBuilder).setConnectionTimeout(12); }