Refactored Document unit tests