Fix test method on documents