Add tests for unloading documents