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