added tests for content length and user_id presence