Fix a flaky test, it seems if the document is not closed, the automatic closing of file-handles interferes with subsequent tests, by closing the document this flakiness seems to be gone. Flakiness could be reproduced locally by continuously running test with IntelliJ "run until failure" run-config option and after aprox. 17,000 test-executions!