Adds tests for empty document support