added test for document join