public static <T> T createConsumer( String baseUrl, Class<T> type, Object... customProvider ) {
    validateArguments( baseUrl, type );
    Path path = type.getAnnotation( Path.class );
    return ( T )Proxy.newProxyInstance( type.getClassLoader(), 
                                        new Class<?>[] { type }, 
                                        new ResourceInvocationHandler( baseUrl + path.value(), customProvider ) );
  }