Added getDocument methods + tests